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
432d0233
Commit
432d0233
authored
Oct 14, 2015
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix empty roomname with password VS random
parent
1b7ee273
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
2 deletions
+6
-2
room.coffee
room.coffee
+1
-0
room.js
room.js
+3
-0
ygopro-server.coffee
ygopro-server.coffee
+1
-1
ygopro-server.js
ygopro-server.js
+1
-1
No files found.
room.coffee
View file @
432d0233
...
@@ -75,6 +75,7 @@ class Room
...
@@ -75,6 +75,7 @@ class Room
client_name_and_pass
=
name
.
split
(
'$'
,
2
)
client_name_and_pass
=
name
.
split
(
'$'
,
2
)
client_name
=
client_name_and_pass
[
0
]
client_name
=
client_name_and_pass
[
0
]
client_pass
=
client_name_and_pass
[
1
]
client_pass
=
client_name_and_pass
[
1
]
return
true
if
!
client_pass
!
_
.
find
Room
.
all
,
(
room
)
->
!
_
.
find
Room
.
all
,
(
room
)
->
room_name_and_pass
=
room
.
name
.
split
(
'$'
,
2
)
room_name_and_pass
=
room
.
name
.
split
(
'$'
,
2
)
room_name
=
room_name_and_pass
[
0
]
room_name
=
room_name_and_pass
[
0
]
...
...
room.js
View file @
432d0233
...
@@ -95,6 +95,9 @@
...
@@ -95,6 +95,9 @@
client_name_and_pass
=
name
.
split
(
'
$
'
,
2
);
client_name_and_pass
=
name
.
split
(
'
$
'
,
2
);
client_name
=
client_name_and_pass
[
0
];
client_name
=
client_name_and_pass
[
0
];
client_pass
=
client_name_and_pass
[
1
];
client_pass
=
client_name_and_pass
[
1
];
if
(
!
client_pass
)
{
return
true
;
}
return
!
_
.
find
(
Room
.
all
,
function
(
room
)
{
return
!
_
.
find
(
Room
.
all
,
function
(
room
)
{
var
room_name
,
room_name_and_pass
,
room_pass
;
var
room_name
,
room_name_and_pass
,
room_pass
;
room_name_and_pass
=
room
.
name
.
split
(
'
$
'
,
2
);
room_name_and_pass
=
room
.
name
.
split
(
'
$
'
,
2
);
...
...
ygopro-server.coffee
View file @
432d0233
...
@@ -256,7 +256,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
...
@@ -256,7 +256,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
}
}
client
.
end
()
client
.
end
()
else
if
!
Room
.
validate
(
info
.
pass
)
else
if
info
.
pass
.
length
&&
!
Room
.
validate
(
info
.
pass
)
#ygopro.stoc_send client, 'ERROR_MSG',{
#ygopro.stoc_send client, 'ERROR_MSG',{
# msg: 1
# msg: 1
# code: 1 #这返错有问题,直接双ygopro直连怎么都正常,在这里就经常弹不出提示
# code: 1 #这返错有问题,直接双ygopro直连怎么都正常,在这里就经常弹不出提示
...
...
ygopro-server.js
View file @
432d0233
...
@@ -278,7 +278,7 @@
...
@@ -278,7 +278,7 @@
code
:
2
code
:
2
});
});
client
.
end
();
client
.
end
();
}
else
if
(
!
Room
.
validate
(
info
.
pass
))
{
}
else
if
(
info
.
pass
.
length
&&
!
Room
.
validate
(
info
.
pass
))
{
ygopro
.
stoc_send_chat
(
client
,
"
房间密码不正确
"
,
11
);
ygopro
.
stoc_send_chat
(
client
,
"
房间密码不正确
"
,
11
);
ygopro
.
stoc_send
(
client
,
'
ERROR_MSG
'
,
{
ygopro
.
stoc_send
(
client
,
'
ERROR_MSG
'
,
{
msg
:
1
,
msg
:
1
,
...
...
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