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
c6b37a09
Commit
c6b37a09
authored
Feb 26, 2016
by
神楽坂玲奈
Committed by
Ma
Feb 26, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
c2539437
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
room.js
room.js
+3
-3
ygopro-server.coffee
ygopro-server.coffee
+9
-0
ygopro-server.js
ygopro-server.js
+9
-0
No files found.
room.js
View file @
c6b37a09
// Generated by CoffeeScript 1.
10.0
// Generated by CoffeeScript 1.
9.3
(
function
()
{
var
Room
,
_
,
bunyan
,
get_memory_usage
,
log
,
moment
,
roomlist
,
settings
,
spawn
,
spawnSync
,
ygopro
;
...
...
@@ -187,7 +187,7 @@
};
function
Room
(
name
,
hostinfo
)
{
var
draw_count
,
error1
,
lflist
,
param
,
rule
,
start_hand
,
start_lp
,
time_limit
;
var
draw_count
,
lflist
,
param
,
rule
,
start_hand
,
start_lp
,
time_limit
;
this
.
hostinfo
=
hostinfo
;
this
.
name
=
name
;
this
.
alive
=
true
;
...
...
@@ -412,7 +412,7 @@
});
};
})(
this
));
}
catch
(
error1
)
{
}
catch
(
_error
)
{
this
.
error
=
"
建立房间失败,请重试
"
;
}
}
...
...
ygopro-server.coffee
View file @
c6b37a09
...
...
@@ -333,6 +333,15 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
buffer
=
new
Buffer
(
info
.
pass
[
0
...
8
],
'base64'
)
if
buffer
.
length
!=
6
ygopro
.
stoc_send_chat
(
client
,
'主机密码不正确 (Invalid Payload Length)'
,
11
)
ygopro
.
stoc_send
client
,
'ERROR_MSG'
,{
msg
:
1
code
:
2
}
client
.
end
()
return
check
=
(
buf
)
->
checksum
=
0
for
i
in
[
0
...
buf
.
length
]
...
...
ygopro-server.js
View file @
c6b37a09
...
...
@@ -360,6 +360,15 @@
return
;
}
buffer
=
new
Buffer
(
info
.
pass
.
slice
(
0
,
8
),
'
base64
'
);
if
(
buffer
.
length
!==
6
)
{
ygopro
.
stoc_send_chat
(
client
,
'
主机密码不正确 (Invalid Payload Length)
'
,
11
);
ygopro
.
stoc_send
(
client
,
'
ERROR_MSG
'
,
{
msg
:
1
,
code
:
2
});
client
.
end
();
return
;
}
check
=
function
(
buf
)
{
var
checksum
,
i
,
k
,
ref
;
checksum
=
0
;
...
...
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