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
1b25b50b
Commit
1b25b50b
authored
Jul 16, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update time confirm
parent
3e233d9a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
8 deletions
+29
-8
ygopro-server.coffee
ygopro-server.coffee
+13
-4
ygopro-server.js
ygopro-server.js
+16
-4
No files found.
ygopro-server.coffee
View file @
1b25b50b
...
@@ -493,6 +493,9 @@ CLIENT_reconnect_register = (client, room_id, error) ->
...
@@ -493,6 +493,9 @@ CLIENT_reconnect_register = (client, room_id, error) ->
disconnect_list
[
CLIENT_get_authorize_key
(
client
)]
=
dinfo
disconnect_list
[
CLIENT_get_authorize_key
(
client
)]
=
dinfo
#console.log("#{client.name} ${disconnect_from_game}")
#console.log("#{client.name} ${disconnect_from_game}")
ygopro
.
stoc_send_chat_to_room
(
room
,
"
#{
client
.
name
}
${disconnect_from_game}"
+
if
error
then
":
#{
error
}
"
else
''
)
ygopro
.
stoc_send_chat_to_room
(
room
,
"
#{
client
.
name
}
${disconnect_from_game}"
+
if
error
then
":
#{
error
}
"
else
''
)
if
client
.
time_confirm_required
client
.
time_confirm_required
=
false
ygopro
.
ctos_send
(
client
.
server
,
'TIME_CONFIRM'
)
if
settings
.
modules
.
reconnect
.
auto_surrender_after_disconnect
and
room
.
turn
and
room
.
turn
>
0
if
settings
.
modules
.
reconnect
.
auto_surrender_after_disconnect
and
room
.
turn
and
room
.
turn
>
0
ygopro
.
ctos_send
(
client
.
server
,
'SURRENDER'
)
ygopro
.
ctos_send
(
client
.
server
,
'SURRENDER'
)
return
true
return
true
...
@@ -2515,9 +2518,12 @@ ygopro.ctos_follow 'RESPONSE', false, (buffer, info, client, server)->
...
@@ -2515,9 +2518,12 @@ ygopro.ctos_follow 'RESPONSE', false, (buffer, info, client, server)->
ygopro
.
stoc_follow
'TIME_LIMIT'
,
true
,
(
buffer
,
info
,
client
,
server
)
->
ygopro
.
stoc_follow
'TIME_LIMIT'
,
true
,
(
buffer
,
info
,
client
,
server
)
->
room
=
ROOM_all
[
client
.
rid
]
room
=
ROOM_all
[
client
.
rid
]
return
unless
room
return
unless
room
if
settings
.
modules
.
reconnect
.
enabled
and
client
.
closed
if
settings
.
modules
.
reconnect
.
enabled
ygopro
.
ctos_send
(
server
,
'TIME_CONFIRM'
)
if
client
.
closed
return
true
ygopro
.
ctos_send
(
server
,
'TIME_CONFIRM'
)
return
true
else
client
.
time_confirm_required
=
true
return
unless
settings
.
modules
.
heartbeat_detection
.
enabled
and
room
.
turn
and
room
.
turn
>
0
and
!
room
.
windbot
return
unless
settings
.
modules
.
heartbeat_detection
.
enabled
and
room
.
turn
and
room
.
turn
>
0
and
!
room
.
windbot
check
=
false
check
=
false
if
room
.
hostinfo
.
mode
!=
2
if
room
.
hostinfo
.
mode
!=
2
...
@@ -2548,7 +2554,10 @@ ygopro.stoc_follow 'TIME_LIMIT', true, (buffer, info, client, server)->
...
@@ -2548,7 +2554,10 @@ ygopro.stoc_follow 'TIME_LIMIT', true, (buffer, info, client, server)->
ygopro
.
ctos_follow
'TIME_CONFIRM'
,
false
,
(
buffer
,
info
,
client
,
server
)
->
ygopro
.
ctos_follow
'TIME_CONFIRM'
,
false
,
(
buffer
,
info
,
client
,
server
)
->
room
=
ROOM_all
[
client
.
rid
]
room
=
ROOM_all
[
client
.
rid
]
return
unless
room
and
settings
.
modules
.
heartbeat_detection
.
enabled
return
unless
room
if
settings
.
modules
.
reconnect
.
enabled
client
.
time_confirm_required
=
false
return
unlesssettings
.
modules
.
heartbeat_detection
.
enabled
client
.
confirming_cards
=
false
client
.
confirming_cards
=
false
client
.
heartbeat_responsed
=
true
client
.
heartbeat_responsed
=
true
CLIENT_heartbeat_unregister
(
client
)
CLIENT_heartbeat_unregister
(
client
)
...
...
ygopro-server.js
View file @
1b25b50b
...
@@ -630,6 +630,10 @@
...
@@ -630,6 +630,10 @@
dinfo
.
timeout
=
tmot
;
dinfo
.
timeout
=
tmot
;
disconnect_list
[
CLIENT_get_authorize_key
(
client
)]
=
dinfo
;
disconnect_list
[
CLIENT_get_authorize_key
(
client
)]
=
dinfo
;
ygopro
.
stoc_send_chat_to_room
(
room
,
(
client
.
name
+
"
${disconnect_from_game}
"
)
+
(
error
?
"
:
"
+
error
:
''
));
ygopro
.
stoc_send_chat_to_room
(
room
,
(
client
.
name
+
"
${disconnect_from_game}
"
)
+
(
error
?
"
:
"
+
error
:
''
));
if
(
client
.
time_confirm_required
)
{
client
.
time_confirm_required
=
false
;
ygopro
.
ctos_send
(
client
.
server
,
'
TIME_CONFIRM
'
);
}
if
(
settings
.
modules
.
reconnect
.
auto_surrender_after_disconnect
&&
room
.
turn
&&
room
.
turn
>
0
)
{
if
(
settings
.
modules
.
reconnect
.
auto_surrender_after_disconnect
&&
room
.
turn
&&
room
.
turn
>
0
)
{
ygopro
.
ctos_send
(
client
.
server
,
'
SURRENDER
'
);
ygopro
.
ctos_send
(
client
.
server
,
'
SURRENDER
'
);
}
}
...
@@ -3149,9 +3153,13 @@
...
@@ -3149,9 +3153,13 @@
if
(
!
room
)
{
if
(
!
room
)
{
return
;
return
;
}
}
if
(
settings
.
modules
.
reconnect
.
enabled
&&
client
.
closed
)
{
if
(
settings
.
modules
.
reconnect
.
enabled
)
{
ygopro
.
ctos_send
(
server
,
'
TIME_CONFIRM
'
);
if
(
client
.
closed
)
{
return
true
;
ygopro
.
ctos_send
(
server
,
'
TIME_CONFIRM
'
);
return
true
;
}
else
{
client
.
time_confirm_required
=
true
;
}
}
}
if
(
!
(
settings
.
modules
.
heartbeat_detection
.
enabled
&&
room
.
turn
&&
room
.
turn
>
0
&&
!
room
.
windbot
))
{
if
(
!
(
settings
.
modules
.
heartbeat_detection
.
enabled
&&
room
.
turn
&&
room
.
turn
>
0
&&
!
room
.
windbot
))
{
return
;
return
;
...
@@ -3194,9 +3202,13 @@
...
@@ -3194,9 +3202,13 @@
ygopro
.
ctos_follow
(
'
TIME_CONFIRM
'
,
false
,
function
(
buffer
,
info
,
client
,
server
)
{
ygopro
.
ctos_follow
(
'
TIME_CONFIRM
'
,
false
,
function
(
buffer
,
info
,
client
,
server
)
{
var
room
;
var
room
;
room
=
ROOM_all
[
client
.
rid
];
room
=
ROOM_all
[
client
.
rid
];
if
(
!
(
room
&&
settings
.
modules
.
heartbeat_detection
.
enabled
)
)
{
if
(
!
room
)
{
return
;
return
;
}
}
if
(
settings
.
modules
.
reconnect
.
enabled
)
{
client
.
time_confirm_required
=
false
;
}
return
unlesssettings
.
modules
.
heartbeat_detection
.
enabled
;
client
.
confirming_cards
=
false
;
client
.
confirming_cards
=
false
;
client
.
heartbeat_responsed
=
true
;
client
.
heartbeat_responsed
=
true
;
CLIENT_heartbeat_unregister
(
client
);
CLIENT_heartbeat_unregister
(
client
);
...
...
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