Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
srvpro
Commits
8d231346
Commit
8d231346
authored
Jul 30, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mc'
parents
251ce0d4
6dc2417b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
ygopro-server.coffee
ygopro-server.coffee
+3
-3
ygopro-server.js
ygopro-server.js
+3
-3
No files found.
ygopro-server.coffee
View file @
8d231346
...
...
@@ -3114,7 +3114,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server, datas)->
return
unless
room
msg
=
_
.
trim
(
info
.
msg
)
cancel
=
_
.
startsWith
(
msg
,
"/"
)
room
.
last_active_time
=
moment
()
unless
cancel
or
not
(
room
.
random_type
or
room
.
arena
)
room
.
last_active_time
=
moment
()
unless
cancel
or
not
(
room
.
random_type
or
room
.
arena
)
or
room
.
duel_stage
==
ygopro
.
constants
.
DUEL_STAGE
.
FINGER
or
room
.
duel_stage
==
ygopro
.
constants
.
DUEL_STAGE
.
FIRSTGO
or
room
.
duel_stage
==
ygopro
.
constants
.
DUEL_STAGE
.
SIDING
cmd
=
msg
.
split
(
' '
)
switch
cmd
[
0
]
when
'/投降'
,
'/surrender'
...
...
@@ -3682,7 +3682,7 @@ ygopro.stoc_follow 'REPLAY', true, (buffer, info, client, server, datas)->
if
settings
.
modules
.
random_duel
.
enabled
setInterval
()
->
for
room
in
ROOM_all
when
room
and
room
.
duel_stage
!=
ygopro
.
constants
.
DUEL_STAGE
.
BEGIN
and
room
.
random_type
and
room
.
last_active_time
and
room
.
waiting_for_player
and
room
.
get_disconnected_count
()
==
0
for
room
in
ROOM_all
when
room
and
room
.
duel_stage
!=
ygopro
.
constants
.
DUEL_STAGE
.
BEGIN
and
room
.
random_type
and
room
.
last_active_time
and
room
.
waiting_for_player
and
room
.
get_disconnected_count
()
==
0
and
(
!
settings
.
modules
.
side_timeout
or
room
.
duel_stage
!=
ygopro
.
constants
.
DUEL_STAGE
.
SIDING
)
time_passed
=
Math
.
floor
((
moment
()
-
room
.
last_active_time
)
/
1000
)
#log.info time_passed
if
time_passed
>=
settings
.
modules
.
random_duel
.
hang_timeout
...
...
@@ -3701,7 +3701,7 @@ if settings.modules.random_duel.enabled
if
settings
.
modules
.
mycard
.
enabled
setInterval
()
->
for
room
in
ROOM_all
when
room
and
room
.
duel_stage
!=
ygopro
.
constants
.
DUEL_STAGE
.
BEGIN
and
room
.
arena
and
room
.
last_active_time
and
room
.
waiting_for_player
and
room
.
get_disconnected_count
()
==
0
for
room
in
ROOM_all
when
room
and
room
.
duel_stage
!=
ygopro
.
constants
.
DUEL_STAGE
.
BEGIN
and
room
.
arena
and
room
.
last_active_time
and
room
.
waiting_for_player
and
room
.
get_disconnected_count
()
==
0
and
(
!
settings
.
modules
.
side_timeout
or
room
.
duel_stage
!=
ygopro
.
constants
.
DUEL_STAGE
.
SIDING
)
time_passed
=
Math
.
floor
((
moment
()
-
room
.
last_active_time
)
/
1000
)
#log.info time_passed
if
time_passed
>=
settings
.
modules
.
random_duel
.
hang_timeout
...
...
ygopro-server.js
View file @
8d231346
...
...
@@ -4023,7 +4023,7 @@
}
msg
=
_
.
trim
(
info
.
msg
);
cancel
=
_
.
startsWith
(
msg
,
"
/
"
);
if
(
!
(
cancel
||
!
(
room
.
random_type
||
room
.
arena
)))
{
if
(
!
(
cancel
||
!
(
room
.
random_type
||
room
.
arena
)
||
room
.
duel_stage
===
ygopro
.
constants
.
DUEL_STAGE
.
FINGER
||
room
.
duel_stage
===
ygopro
.
constants
.
DUEL_STAGE
.
FIRSTGO
||
room
.
duel_stage
===
ygopro
.
constants
.
DUEL_STAGE
.
SIDING
))
{
room
.
last_active_time
=
moment
();
}
cmd
=
msg
.
split
(
'
'
);
...
...
@@ -4804,7 +4804,7 @@
var
len2
,
m
,
room
,
time_passed
;
for
(
m
=
0
,
len2
=
ROOM_all
.
length
;
m
<
len2
;
m
++
)
{
room
=
ROOM_all
[
m
];
if
(
!
(
room
&&
room
.
duel_stage
!==
ygopro
.
constants
.
DUEL_STAGE
.
BEGIN
&&
room
.
random_type
&&
room
.
last_active_time
&&
room
.
waiting_for_player
&&
room
.
get_disconnected_count
()
===
0
))
{
if
(
!
(
room
&&
room
.
duel_stage
!==
ygopro
.
constants
.
DUEL_STAGE
.
BEGIN
&&
room
.
random_type
&&
room
.
last_active_time
&&
room
.
waiting_for_player
&&
room
.
get_disconnected_count
()
===
0
&&
(
!
settings
.
modules
.
side_timeout
||
room
.
duel_stage
!==
ygopro
.
constants
.
DUEL_STAGE
.
SIDING
)
))
{
continue
;
}
time_passed
=
Math
.
floor
((
moment
()
-
room
.
last_active_time
)
/
1000
);
...
...
@@ -4828,7 +4828,7 @@
var
len2
,
len3
,
m
,
n
,
player
,
room
,
time_passed
,
waited_time
;
for
(
m
=
0
,
len2
=
ROOM_all
.
length
;
m
<
len2
;
m
++
)
{
room
=
ROOM_all
[
m
];
if
(
!
(
room
&&
room
.
duel_stage
!==
ygopro
.
constants
.
DUEL_STAGE
.
BEGIN
&&
room
.
arena
&&
room
.
last_active_time
&&
room
.
waiting_for_player
&&
room
.
get_disconnected_count
()
===
0
))
{
if
(
!
(
room
&&
room
.
duel_stage
!==
ygopro
.
constants
.
DUEL_STAGE
.
BEGIN
&&
room
.
arena
&&
room
.
last_active_time
&&
room
.
waiting_for_player
&&
room
.
get_disconnected_count
()
===
0
&&
(
!
settings
.
modules
.
side_timeout
||
room
.
duel_stage
!==
ygopro
.
constants
.
DUEL_STAGE
.
SIDING
)
))
{
continue
;
}
time_passed
=
Math
.
floor
((
moment
()
-
room
.
last_active_time
)
/
1000
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment