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
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
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
MyCard
srvpro
Commits
e0323201
Commit
e0323201
authored
Jun 30, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
77a5d346
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
ygopro-server.coffee
ygopro-server.coffee
+4
-0
ygopro-server.js
ygopro-server.js
+3
-0
No files found.
ygopro-server.coffee
View file @
e0323201
...
...
@@ -491,6 +491,7 @@ CLIENT_reconnect_register = (client, room_id, error) ->
,
settings
.
modules
.
reconnect
.
wait_time
)
dinfo
.
timeout
=
tmot
disconnect_list
[
CLIENT_get_authorize_key
(
client
)]
=
dinfo
#console.log("#{client.name} ${disconnect_from_game}")
ygopro
.
stoc_send_chat_to_room
(
room
,
"
#{
client
.
name
}
${disconnect_from_game}"
+
if
error
then
":
#{
error
}
"
else
''
)
if
settings
.
modules
.
reconnect
.
auto_surrender_after_disconnect
and
room
.
turn
and
room
.
turn
>
0
ygopro
.
ctos_send
(
client
.
server
,
'SURRENDER'
)
...
...
@@ -635,6 +636,7 @@ CLIENT_reconnect = (client) ->
room
.
last_active_time
=
moment
()
CLIENT_import_data
(
client
,
dinfo
.
old_client
,
room
)
CLIENT_send_reconnect_info
(
client
,
client
.
server
,
room
)
#console.log("#{client.name} ${reconnect_to_game}")
ygopro
.
stoc_send_chat_to_room
(
room
,
"
#{
client
.
name
}
${reconnect_to_game}"
)
CLIENT_reconnect_unregister
(
client
,
true
)
return
...
...
@@ -1028,6 +1030,8 @@ net.createServer (client) ->
#log.info "disconnect", client.ip, ROOM_connected_ip[client.ip]
unless
client
.
closed
client
.
closed
=
true
if
settings
.
modules
.
heartbeat_detection
.
enabled
CLIENT_heartbeat_unregister
(
client
)
if
room
if
!
CLIENT_reconnect_register
(
client
,
client
.
rid
)
room
.
disconnect
(
client
)
...
...
ygopro-server.js
View file @
e0323201
...
...
@@ -1312,6 +1312,9 @@
ROOM_connected_ip
[
client
.
ip
]
=
connect_count
;
if
(
!
client
.
closed
)
{
client
.
closed
=
true
;
if
(
settings
.
modules
.
heartbeat_detection
.
enabled
)
{
CLIENT_heartbeat_unregister
(
client
);
}
if
(
room
)
{
if
(
!
CLIENT_reconnect_register
(
client
,
client
.
rid
))
{
room
.
disconnect
(
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