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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
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
nanahira
srvpro
Commits
747a8251
Commit
747a8251
authored
Jun 08, 2016
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update version
parent
d2339ce1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
ygopro-server.coffee
ygopro-server.coffee
+10
-2
ygopro-server.js
ygopro-server.js
+11
-3
No files found.
ygopro-server.coffee
View file @
747a8251
...
...
@@ -66,7 +66,7 @@ nconf.myset = (settings, path, val) ->
settings
.
BANNED_user
=
[]
settings
.
BANNED_IP
=
[]
settings
.
version
=
parseInt
(
fs
.
readFileSync
(
'ygopro/gframe/game.cpp'
,
'utf8'
).
match
(
/PRO_VERSION = ([x\d]+)/
)[
1
],
'16'
)
settings
.
version
=
parseInt
(
fs
.
readFileSync
(
'ygopro/gframe/game.cpp'
,
'utf8'
).
match
(
/PRO_VERSION = ([x\d
ABCDEF
]+)/
)[
1
],
'16'
)
settings
.
lflist
=
(
for
list
in
fs
.
readFileSync
(
'ygopro/lflist.conf'
,
'utf8'
).
match
(
/!.*/g
)
date
=
list
.
match
(
/!([\d\.]+)/
)
continue
unless
date
...
...
@@ -762,7 +762,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
else
ygopro
.
stoc_die
(
client
,
"没有找到录像"
)
else
if
info
.
version
!=
settings
.
version
else
if
info
.
version
!=
settings
.
version
and
info
.
version
!=
4921
#YGOMobile不更新,强行兼容
ygopro
.
stoc_send_chat
(
client
,
settings
.
modules
.
update
,
ygopro
.
constants
.
COLORS
.
RED
)
ygopro
.
stoc_send
client
,
'ERROR_MSG'
,
{
msg
:
4
...
...
@@ -921,6 +921,14 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
ygopro
.
stoc_die
(
client
,
"您的账号已被封禁"
)
else
if
info
.
version
==
4921
#YGOMobile不更新,强行兼容
info
.
version
=
settings
.
version
struct
=
ygopro
.
structs
[
"CTOS_JoinGame"
]
struct
.
_setBuff
(
buffer
)
struct
.
set
(
"version"
,
info
.
version
)
buffer
=
struct
.
buffer
ygopro
.
stoc_send_chat
(
client
,
"您的版本号过低,可能出现未知问题,电脑用户请升级版本,YGOMobile用户请等待作者更新"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
)
#log.info 'join_game',info.pass, client.name
room
=
ROOM_find_or_create_by_name
(
info
.
pass
,
client
.
remoteAddress
)
if
!
room
...
...
ygopro-server.js
View file @
747a8251
...
...
@@ -91,7 +91,7 @@
settings
.
BANNED_IP
=
[];
settings
.
version
=
parseInt
(
fs
.
readFileSync
(
'
ygopro/gframe/game.cpp
'
,
'
utf8
'
).
match
(
/PRO_VERSION =
([
x
\d]
+
)
/
)[
1
],
'
16
'
);
settings
.
version
=
parseInt
(
fs
.
readFileSync
(
'
ygopro/gframe/game.cpp
'
,
'
utf8
'
).
match
(
/PRO_VERSION =
([
x
\d
ABCDEF
]
+
)
/
)[
1
],
'
16
'
);
settings
.
lflist
=
(
function
()
{
var
k
,
len
,
ref
,
results
;
...
...
@@ -910,7 +910,7 @@
});
ygopro
.
ctos_follow
(
'
JOIN_GAME
'
,
false
,
function
(
buffer
,
info
,
client
,
server
)
{
var
check
,
decrypted_buffer
,
finish
,
i
,
id
,
k
,
l
,
len
,
len1
,
name
,
ref
,
ref1
,
replay_id
,
room
,
secret
,
windbot
;
var
check
,
decrypted_buffer
,
finish
,
i
,
id
,
k
,
l
,
len
,
len1
,
name
,
ref
,
ref1
,
replay_id
,
room
,
secret
,
struct
,
windbot
;
if
(
settings
.
modules
.
stop
)
{
ygopro
.
stoc_die
(
client
,
settings
.
modules
.
stop
);
}
else
if
(
info
.
pass
.
toUpperCase
()
===
"
R
"
&&
settings
.
modules
.
enable_cloud_replay
)
{
...
...
@@ -949,7 +949,7 @@
}
else
{
ygopro
.
stoc_die
(
client
,
"
没有找到录像
"
);
}
}
else
if
(
info
.
version
!==
settings
.
version
)
{
}
else
if
(
info
.
version
!==
settings
.
version
&&
info
.
version
!==
4921
)
{
ygopro
.
stoc_send_chat
(
client
,
settings
.
modules
.
update
,
ygopro
.
constants
.
COLORS
.
RED
);
ygopro
.
stoc_send
(
client
,
'
ERROR_MSG
'
,
{
msg
:
4
,
...
...
@@ -1115,6 +1115,14 @@
log
.
info
(
"
BANNED IP LOGIN
"
,
client
.
name
,
client
.
remoteAddress
);
ygopro
.
stoc_die
(
client
,
"
您的账号已被封禁
"
);
}
else
{
if
(
info
.
version
===
4921
)
{
info
.
version
=
settings
.
version
;
struct
=
ygopro
.
structs
[
"
CTOS_JoinGame
"
];
struct
.
_setBuff
(
buffer
);
struct
.
set
(
"
version
"
,
info
.
version
);
buffer
=
struct
.
buffer
;
ygopro
.
stoc_send_chat
(
client
,
"
您的版本号过低,可能出现未知问题,电脑用户请升级版本,YGOMobile用户请等待作者更新
"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
);
}
room
=
ROOM_find_or_create_by_name
(
info
.
pass
,
client
.
remoteAddress
);
if
(
!
room
)
{
ygopro
.
stoc_die
(
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