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
e9abcf92
Commit
e9abcf92
authored
Jan 01, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "remove version workaround"
This reverts commit
0494609f
.
parent
03960663
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
16 deletions
+30
-16
ygopro-server.coffee
ygopro-server.coffee
+14
-14
ygopro-server.js
ygopro-server.js
+16
-2
No files found.
ygopro-server.coffee
View file @
e9abcf92
...
@@ -914,7 +914,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
...
@@ -914,7 +914,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
replay_id
=
Cloud_replay_ids
[
Math
.
floor
(
Math
.
random
()
*
Cloud_replay_ids
.
length
)]
replay_id
=
Cloud_replay_ids
[
Math
.
floor
(
Math
.
random
()
*
Cloud_replay_ids
.
length
)]
redisdb
.
hgetall
"replay:"
+
replay_id
,
client
.
open_cloud_replay
redisdb
.
hgetall
"replay:"
+
replay_id
,
client
.
open_cloud_replay
else
if
info
.
version
!=
settings
.
version
#
and (info.version < 9020 or settings.version != 4927) #强行兼容23333版
else
if
info
.
version
!=
settings
.
version
and
(
info
.
version
<
9020
or
settings
.
version
!=
4927
)
#强行兼容23333版
ygopro
.
stoc_send_chat
(
client
,
settings
.
modules
.
update
,
ygopro
.
constants
.
COLORS
.
RED
)
ygopro
.
stoc_send_chat
(
client
,
settings
.
modules
.
update
,
ygopro
.
constants
.
COLORS
.
RED
)
ygopro
.
stoc_send
client
,
'ERROR_MSG'
,
{
ygopro
.
stoc_send
client
,
'ERROR_MSG'
,
{
msg
:
4
msg
:
4
...
@@ -931,12 +931,12 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
...
@@ -931,12 +931,12 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
ygopro
.
stoc_die
(
client
,
'${invalid_password_length}'
)
ygopro
.
stoc_die
(
client
,
'${invalid_password_length}'
)
return
return
#
if info.version >= 9020 and settings.version == 4927 #强行兼容23333版
if
info
.
version
>=
9020
and
settings
.
version
==
4927
#强行兼容23333版
#
info.version = settings.version
info
.
version
=
settings
.
version
#
struct = ygopro.structs["CTOS_JoinGame"]
struct
=
ygopro
.
structs
[
"CTOS_JoinGame"
]
#
struct._setBuff(buffer)
struct
.
_setBuff
(
buffer
)
#
struct.set("version", info.version)
struct
.
set
(
"version"
,
info
.
version
)
#
buffer = struct.buffer
buffer
=
struct
.
buffer
buffer
=
new
Buffer
(
info
.
pass
[
0
...
8
],
'base64'
)
buffer
=
new
Buffer
(
info
.
pass
[
0
...
8
],
'base64'
)
...
@@ -1109,13 +1109,13 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
...
@@ -1109,13 +1109,13 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
ygopro
.
stoc_die
(
client
,
"${invalid_password_room}"
)
ygopro
.
stoc_die
(
client
,
"${invalid_password_room}"
)
else
else
#
if info.version >= 9020 and settings.version == 4927 #强行兼容23333版
if
info
.
version
>=
9020
and
settings
.
version
==
4927
#强行兼容23333版
#
info.version = settings.version
info
.
version
=
settings
.
version
#
struct = ygopro.structs["CTOS_JoinGame"]
struct
=
ygopro
.
structs
[
"CTOS_JoinGame"
]
#
struct._setBuff(buffer)
struct
.
_setBuff
(
buffer
)
#
struct.set("version", info.version)
struct
.
set
(
"version"
,
info
.
version
)
#
buffer = struct.buffer
buffer
=
struct
.
buffer
#
#ygopro.stoc_send_chat(client, "看起来你是YGOMobile的用户,请记得更新先行卡补丁,否则会看到白卡", ygopro.constants.COLORS.GREEN)
#ygopro.stoc_send_chat(client, "看起来你是YGOMobile的用户,请记得更新先行卡补丁,否则会看到白卡", ygopro.constants.COLORS.GREEN)
#log.info 'join_game',info.pass, client.name
#log.info 'join_game',info.pass, client.name
room
=
ROOM_find_or_create_by_name
(
info
.
pass
,
client
.
ip
)
room
=
ROOM_find_or_create_by_name
(
info
.
pass
,
client
.
ip
)
...
...
ygopro-server.js
View file @
e9abcf92
...
@@ -1103,7 +1103,7 @@
...
@@ -1103,7 +1103,7 @@
});
});
ygopro
.
ctos_follow
(
'
JOIN_GAME
'
,
false
,
function
(
buffer
,
info
,
client
,
server
)
{
ygopro
.
ctos_follow
(
'
JOIN_GAME
'
,
false
,
function
(
buffer
,
info
,
client
,
server
)
{
var
check
,
decrypted_buffer
,
finish
,
i
,
id
,
j
,
k
,
len
,
len1
,
name
,
ref
,
ref1
,
replay_id
,
room
,
secret
;
var
check
,
decrypted_buffer
,
finish
,
i
,
id
,
j
,
k
,
len
,
len1
,
name
,
ref
,
ref1
,
replay_id
,
room
,
secret
,
struct
;
info
.
pass
=
info
.
pass
.
trim
();
info
.
pass
=
info
.
pass
.
trim
();
if
(
settings
.
modules
.
stop
)
{
if
(
settings
.
modules
.
stop
)
{
ygopro
.
stoc_die
(
client
,
settings
.
modules
.
stop
);
ygopro
.
stoc_die
(
client
,
settings
.
modules
.
stop
);
...
@@ -1150,7 +1150,7 @@
...
@@ -1150,7 +1150,7 @@
}
else
if
(
info
.
pass
.
toUpperCase
()
===
"
W
"
&&
settings
.
modules
.
cloud_replay
.
enabled
)
{
}
else
if
(
info
.
pass
.
toUpperCase
()
===
"
W
"
&&
settings
.
modules
.
cloud_replay
.
enabled
)
{
replay_id
=
Cloud_replay_ids
[
Math
.
floor
(
Math
.
random
()
*
Cloud_replay_ids
.
length
)];
replay_id
=
Cloud_replay_ids
[
Math
.
floor
(
Math
.
random
()
*
Cloud_replay_ids
.
length
)];
redisdb
.
hgetall
(
"
replay:
"
+
replay_id
,
client
.
open_cloud_replay
);
redisdb
.
hgetall
(
"
replay:
"
+
replay_id
,
client
.
open_cloud_replay
);
}
else
if
(
info
.
version
!==
settings
.
version
)
{
}
else
if
(
info
.
version
!==
settings
.
version
&&
(
info
.
version
<
9020
||
settings
.
version
!==
4927
)
)
{
ygopro
.
stoc_send_chat
(
client
,
settings
.
modules
.
update
,
ygopro
.
constants
.
COLORS
.
RED
);
ygopro
.
stoc_send_chat
(
client
,
settings
.
modules
.
update
,
ygopro
.
constants
.
COLORS
.
RED
);
ygopro
.
stoc_send
(
client
,
'
ERROR_MSG
'
,
{
ygopro
.
stoc_send
(
client
,
'
ERROR_MSG
'
,
{
msg
:
4
,
msg
:
4
,
...
@@ -1165,6 +1165,13 @@
...
@@ -1165,6 +1165,13 @@
ygopro
.
stoc_die
(
client
,
'
${invalid_password_length}
'
);
ygopro
.
stoc_die
(
client
,
'
${invalid_password_length}
'
);
return
;
return
;
}
}
if
(
info
.
version
>=
9020
&&
settings
.
version
===
4927
)
{
info
.
version
=
settings
.
version
;
struct
=
ygopro
.
structs
[
"
CTOS_JoinGame
"
];
struct
.
_setBuff
(
buffer
);
struct
.
set
(
"
version
"
,
info
.
version
);
buffer
=
struct
.
buffer
;
}
buffer
=
new
Buffer
(
info
.
pass
.
slice
(
0
,
8
),
'
base64
'
);
buffer
=
new
Buffer
(
info
.
pass
.
slice
(
0
,
8
),
'
base64
'
);
if
(
buffer
.
length
!==
6
)
{
if
(
buffer
.
length
!==
6
)
{
ygopro
.
stoc_die
(
client
,
'
${invalid_password_payload}
'
);
ygopro
.
stoc_die
(
client
,
'
${invalid_password_payload}
'
);
...
@@ -1348,6 +1355,13 @@
...
@@ -1348,6 +1355,13 @@
}
else
if
(
info
.
pass
.
length
&&
!
ROOM_validate
(
info
.
pass
))
{
}
else
if
(
info
.
pass
.
length
&&
!
ROOM_validate
(
info
.
pass
))
{
ygopro
.
stoc_die
(
client
,
"
${invalid_password_room}
"
);
ygopro
.
stoc_die
(
client
,
"
${invalid_password_room}
"
);
}
else
{
}
else
{
if
(
info
.
version
>=
9020
&&
settings
.
version
===
4927
)
{
info
.
version
=
settings
.
version
;
struct
=
ygopro
.
structs
[
"
CTOS_JoinGame
"
];
struct
.
_setBuff
(
buffer
);
struct
.
set
(
"
version
"
,
info
.
version
);
buffer
=
struct
.
buffer
;
}
room
=
ROOM_find_or_create_by_name
(
info
.
pass
,
client
.
ip
);
room
=
ROOM_find_or_create_by_name
(
info
.
pass
,
client
.
ip
);
if
(
!
room
)
{
if
(
!
room
)
{
ygopro
.
stoc_die
(
client
,
"
${server_full}
"
);
ygopro
.
stoc_die
(
client
,
"
${server_full}
"
);
...
...
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