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
55f93dc3
Commit
55f93dc3
authored
Sep 07, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mc'
parents
7e12df95
4bc11ec0
Pipeline
#5395
passed with stages
in 79 minutes and 3 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
32 deletions
+33
-32
ygopro-server.coffee
ygopro-server.coffee
+13
-12
ygopro-server.js
ygopro-server.js
+20
-20
No files found.
ygopro-server.coffee
View file @
55f93dc3
...
...
@@ -2201,18 +2201,6 @@ ygopro.ctos_follow 'PLAYER_INFO', true, (buffer, info, client, server, datas)->
return
false
,
name
))
client
.
rag
=
true
if
settings
.
modules
.
mycard
.
enabled
and
settings
.
modules
.
mycard
.
ban_get
and
!
client
.
is_local
try
banMCRequest
=
await
axios
.
get
settings
.
modules
.
mycard
.
ban_get
,
paramsSerializer
:
qs
.
stringify
params
:
user
:
name
if
typeof
(
banMCRequest
.
data
)
==
"object"
client
.
ban_mc
=
banMCRequest
.
data
else
log
.
warn
"ban get bad json"
,
banMCRequest
.
data
catch
e
log
.
warn
'ban get error'
,
e
.
toString
()
struct
=
ygopro
.
structs
.
get
(
"CTOS_PlayerInfo"
)
struct
.
_setBuff
(
buffer
)
struct
.
set
(
"name"
,
name
)
...
...
@@ -2322,6 +2310,19 @@ ygopro.ctos_follow 'JOIN_GAME', true, (buffer, info, client, server, datas)->
if
buffer
.
length
!=
6
ygopro
.
stoc_die
(
client
,
'${invalid_password_payload}'
)
return
if
settings
.
modules
.
mycard
.
enabled
and
settings
.
modules
.
mycard
.
ban_get
and
!
client
.
is_local
try
banMCRequest
=
await
axios
.
get
settings
.
modules
.
mycard
.
ban_get
,
paramsSerializer
:
qs
.
stringify
params
:
user
:
name
if
typeof
(
banMCRequest
.
data
)
==
"object"
client
.
ban_mc
=
banMCRequest
.
data
else
log
.
warn
"ban get bad json"
,
banMCRequest
.
data
catch
e
log
.
warn
'ban get error'
,
e
.
toString
()
check_buffer_indentity
=
(
buf
)
->
checksum
=
0
...
...
ygopro-server.js
View file @
55f93dc3
...
...
@@ -2918,7 +2918,7 @@
// 功能模块
// return true to cancel a synchronous message
ygopro
.
ctos_follow
(
'
PLAYER_INFO
'
,
true
,
async
function
(
buffer
,
info
,
client
,
server
,
datas
)
{
var
banMCRequest
,
e
,
geo
,
lang
,
name
,
name_full
,
struct
,
vpass
;
var
geo
,
lang
,
name
,
name_full
,
struct
,
vpass
;
// checkmate use username$password, but here don't
// so remove the password
name_full
=
info
.
name
.
replace
(
/
\\
/g
,
""
).
split
(
"
$
"
);
...
...
@@ -2939,24 +2939,6 @@
},
name
))
{
client
.
rag
=
true
;
}
if
(
settings
.
modules
.
mycard
.
enabled
&&
settings
.
modules
.
mycard
.
ban_get
&&
!
client
.
is_local
)
{
try
{
banMCRequest
=
(
await
axios
.
get
(
settings
.
modules
.
mycard
.
ban_get
,
{
paramsSerializer
:
qs
.
stringify
,
params
:
{
user
:
name
}
}));
if
(
typeof
banMCRequest
.
data
===
"
object
"
)
{
client
.
ban_mc
=
banMCRequest
.
data
;
}
else
{
log
.
warn
(
"
ban get bad json
"
,
banMCRequest
.
data
);
}
}
catch
(
error1
)
{
e
=
error1
;
log
.
warn
(
'
ban get error
'
,
e
.
toString
());
}
}
struct
=
ygopro
.
structs
.
get
(
"
CTOS_PlayerInfo
"
);
struct
.
_setBuff
(
buffer
);
struct
.
set
(
"
name
"
,
name
);
...
...
@@ -2985,7 +2967,7 @@
});
ygopro
.
ctos_follow
(
'
JOIN_GAME
'
,
true
,
async
function
(
buffer
,
info
,
client
,
server
,
datas
)
{
var
available_logs
,
check_buffer_indentity
,
create_room_with_action
,
duelLog
,
exactBan
,
index
,
j
,
l
,
len
,
len1
,
pre_room
,
recover_match
,
replay
,
replay_id
,
replays
,
room
,
struct
;
var
available_logs
,
banMCRequest
,
check_buffer_indentity
,
create_room_with_action
,
duelLog
,
e
,
exactBan
,
index
,
j
,
l
,
len
,
len1
,
pre_room
,
recover_match
,
replay
,
replay_id
,
replays
,
room
,
struct
;
//log.info info
info
.
pass
=
info
.
pass
.
trim
();
client
.
pass
=
info
.
pass
;
...
...
@@ -3065,6 +3047,24 @@
ygopro
.
stoc_die
(
client
,
'
${invalid_password_payload}
'
);
return
;
}
if
(
settings
.
modules
.
mycard
.
enabled
&&
settings
.
modules
.
mycard
.
ban_get
&&
!
client
.
is_local
)
{
try
{
banMCRequest
=
(
await
axios
.
get
(
settings
.
modules
.
mycard
.
ban_get
,
{
paramsSerializer
:
qs
.
stringify
,
params
:
{
user
:
name
}
}));
if
(
typeof
banMCRequest
.
data
===
"
object
"
)
{
client
.
ban_mc
=
banMCRequest
.
data
;
}
else
{
log
.
warn
(
"
ban get bad json
"
,
banMCRequest
.
data
);
}
}
catch
(
error1
)
{
e
=
error1
;
log
.
warn
(
'
ban get error
'
,
e
.
toString
());
}
}
check_buffer_indentity
=
function
(
buf
)
{
var
checksum
,
i
,
m
,
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