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
34d8cf59
Commit
34d8cf59
authored
Jul 21, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
e1e57055
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
ygopro-server.coffee
ygopro-server.coffee
+5
-5
ygopro-server.js
ygopro-server.js
+5
-5
No files found.
ygopro-server.coffee
View file @
34d8cf59
...
...
@@ -1443,7 +1443,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)->
return
unless
room
msg
=
_
.
trim
(
info
.
msg
)
cancel
=
_
.
startsWith
(
msg
,
"/"
)
room
.
last_active_time
=
moment
()
unless
cancel
or
not
room
.
random_type
room
.
last_active_time
=
moment
()
unless
cancel
or
not
(
room
.
random_type
or
room
.
arena
)
cmd
=
msg
.
split
(
' '
)
switch
cmd
[
0
]
when
'/投降'
,
'/surrender'
...
...
@@ -1620,7 +1620,7 @@ ygopro.ctos_follow 'RESPONSE', false, (buffer, info, client, server)->
ygopro
.
ctos_follow
'HAND_RESULT'
,
false
,
(
buffer
,
info
,
client
,
server
)
->
room
=
ROOM_all
[
client
.
rid
]
return
unless
room
and
room
.
random_type
return
unless
room
and
(
room
.
random_type
or
room
.
arena
)
if
client
.
is_host
room
.
waiting_for_player
=
room
.
waiting_for_player2
room
.
last_active_time
=
moment
().
subtract
(
settings
.
modules
.
random_duel
.
hang_timeout
-
19
,
's'
)
...
...
@@ -1628,13 +1628,13 @@ ygopro.ctos_follow 'HAND_RESULT', false, (buffer, info, client, server)->
ygopro
.
ctos_follow
'TP_RESULT'
,
false
,
(
buffer
,
info
,
client
,
server
)
->
room
=
ROOM_all
[
client
.
rid
]
return
unless
room
and
room
.
random_type
return
unless
room
and
(
room
.
random_type
or
room
.
arena
)
room
.
last_active_time
=
moment
()
return
ygopro
.
stoc_follow
'SELECT_HAND'
,
false
,
(
buffer
,
info
,
client
,
server
)
->
room
=
ROOM_all
[
client
.
rid
]
return
unless
room
and
room
.
random_type
return
unless
room
and
(
room
.
random_type
or
room
.
arena
)
if
client
.
is_host
room
.
waiting_for_player
=
client
else
...
...
@@ -1646,7 +1646,7 @@ ygopro.stoc_follow 'SELECT_TP', false, (buffer, info, client, server)->
room
=
ROOM_all
[
client
.
rid
]
return
unless
room
room
.
changing_side
=
false
if
room
.
random_type
if
room
.
random_type
or
room
.
arena
room
.
waiting_for_player
=
client
room
.
last_active_time
=
moment
()
return
...
...
ygopro-server.js
View file @
34d8cf59
...
...
@@ -1778,7 +1778,7 @@
}
msg
=
_
.
trim
(
info
.
msg
);
cancel
=
_
.
startsWith
(
msg
,
"
/
"
);
if
(
!
(
cancel
||
!
room
.
random_type
))
{
if
(
!
(
cancel
||
!
(
room
.
random_type
||
room
.
arena
)
))
{
room
.
last_active_time
=
moment
();
}
cmd
=
msg
.
split
(
'
'
);
...
...
@@ -2018,7 +2018,7 @@
ygopro
.
ctos_follow
(
'
HAND_RESULT
'
,
false
,
function
(
buffer
,
info
,
client
,
server
)
{
var
room
;
room
=
ROOM_all
[
client
.
rid
];
if
(
!
(
room
&&
room
.
random_type
))
{
if
(
!
(
room
&&
(
room
.
random_type
||
room
.
arena
)
))
{
return
;
}
if
(
client
.
is_host
)
{
...
...
@@ -2030,7 +2030,7 @@
ygopro
.
ctos_follow
(
'
TP_RESULT
'
,
false
,
function
(
buffer
,
info
,
client
,
server
)
{
var
room
;
room
=
ROOM_all
[
client
.
rid
];
if
(
!
(
room
&&
room
.
random_type
))
{
if
(
!
(
room
&&
(
room
.
random_type
||
room
.
arena
)
))
{
return
;
}
room
.
last_active_time
=
moment
();
...
...
@@ -2039,7 +2039,7 @@
ygopro
.
stoc_follow
(
'
SELECT_HAND
'
,
false
,
function
(
buffer
,
info
,
client
,
server
)
{
var
room
;
room
=
ROOM_all
[
client
.
rid
];
if
(
!
(
room
&&
room
.
random_type
))
{
if
(
!
(
room
&&
(
room
.
random_type
||
room
.
arena
)
))
{
return
;
}
if
(
client
.
is_host
)
{
...
...
@@ -2057,7 +2057,7 @@
return
;
}
room
.
changing_side
=
false
;
if
(
room
.
random_type
)
{
if
(
room
.
random_type
||
room
.
arena
)
{
room
.
waiting_for_player
=
client
;
room
.
last_active_time
=
moment
();
}
...
...
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