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
9ee14929
Commit
9ee14929
authored
Jan 21, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix mycard watch
parent
98c3ed11
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
ygopro-server.coffee
ygopro-server.coffee
+12
-0
ygopro-server.js
ygopro-server.js
+17
-1
No files found.
ygopro-server.coffee
View file @
9ee14929
...
...
@@ -980,6 +980,18 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
ygopro
.
stoc_die
(
client
,
"${server_full}"
)
else
if
room
.
error
ygopro
.
stoc_die
(
client
,
room
.
error
)
else
if
room
.
started
if
settings
.
modules
.
cloud_replay
.
enable_halfway_watch
client
.
setTimeout
(
300000
)
#连接后超时5分钟
client
.
rid
=
_
.
indexOf
(
ROOM_all
,
room
)
client
.
is_post_watcher
=
true
ygopro
.
stoc_send_chat_to_room
(
room
,
"
#{
client
.
name
}
${watch_join}"
)
room
.
watchers
.
push
client
ygopro
.
stoc_send_chat
(
client
,
"${watch_watching}"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
)
for
buffer
in
room
.
watcher_buffers
client
.
write
buffer
else
ygopro
.
stoc_die
(
client
,
"${watch_denied}"
)
else
#client.room = room
client
.
setTimeout
(
300000
)
#连接后超时5分钟
...
...
ygopro-server.js
View file @
9ee14929
...
...
@@ -1153,7 +1153,7 @@
return
(
checksum
&
0xFF
)
===
0
;
};
finish
=
function
(
buffer
)
{
var
action
,
name
,
opt1
,
opt2
,
opt3
,
options
,
room
;
var
action
,
j
,
len
,
name
,
opt1
,
opt2
,
opt3
,
options
,
ref
,
room
;
action
=
buffer
.
readUInt8
(
1
)
>>
4
;
if
(
buffer
!==
decrypted_buffer
&&
(
action
===
1
||
action
===
2
||
action
===
4
))
{
ygopro
.
stoc_die
(
client
,
'
${invalid_password_unauthorized}
'
);
...
...
@@ -1210,6 +1210,22 @@
ygopro
.
stoc_die
(
client
,
"
${server_full}
"
);
}
else
if
(
room
.
error
)
{
ygopro
.
stoc_die
(
client
,
room
.
error
);
}
else
if
(
room
.
started
)
{
if
(
settings
.
modules
.
cloud_replay
.
enable_halfway_watch
)
{
client
.
setTimeout
(
300000
);
client
.
rid
=
_
.
indexOf
(
ROOM_all
,
room
);
client
.
is_post_watcher
=
true
;
ygopro
.
stoc_send_chat_to_room
(
room
,
client
.
name
+
"
${watch_join}
"
);
room
.
watchers
.
push
(
client
);
ygopro
.
stoc_send_chat
(
client
,
"
${watch_watching}
"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
);
ref
=
room
.
watcher_buffers
;
for
(
j
=
0
,
len
=
ref
.
length
;
j
<
len
;
j
++
)
{
buffer
=
ref
[
j
];
client
.
write
(
buffer
);
}
}
else
{
ygopro
.
stoc_die
(
client
,
"
${watch_denied}
"
);
}
}
else
{
client
.
setTimeout
(
300000
);
client
.
rid
=
_
.
indexOf
(
ROOM_all
,
room
);
...
...
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