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
14f1b347
Commit
14f1b347
authored
Oct 27, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
9cfe9747
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
14 deletions
+18
-14
ygopro-server.coffee
ygopro-server.coffee
+7
-7
ygopro-server.js
ygopro-server.js
+11
-7
No files found.
ygopro-server.coffee
View file @
14f1b347
...
...
@@ -2207,13 +2207,11 @@ ygopro.ctos_follow 'JOIN_GAME', true, (buffer, info, client, server, datas)->
return
when
4
if
settings
.
modules
.
arena_mode
.
check_permit
match_permit
=
null
try
match
_permit
=
await
(
axios
.
get
settings
.
modules
.
arena_mode
.
check_permit
,
match
PermitRes
=
await
axios
.
get
settings
.
modules
.
arena_mode
.
check_permit
,
responseType
:
'json'
timeout
:
3000
)
.
data
match_permit
=
matchPermitRes
.
data
catch
e
log
.
warn
"match permit fail
#{
e
.
toString
()
}
"
if
client
.
closed
...
...
@@ -2260,11 +2258,13 @@ ygopro.ctos_follow 'JOIN_GAME', true, (buffer, info, client, server, datas)->
return
create_room_with_action
(
decrypted_buffer
,
decrypted_buffer
)
try
userData
=
await
(
axios
.
get
"
#{
settings
.
modules
.
mycard
.
auth_base_url
}
/users/
#{
encodeURIComponent
(
client
.
name
)
}
.json"
,
userUrl
=
"
#{
settings
.
modules
.
mycard
.
auth_base_url
}
/users/
#{
encodeURIComponent
(
client
.
name
)
}
.json"
console
.
log
(
userUrl
)
userDataRes
=
await
axios
.
get
userUrl
,
responseType
:
'json'
timeout
:
10000
)
.
d
ata
userData
=
userDataRes
.
data
console
.
log
userD
ata
catch
e
log
.
warn
(
"READ USER FAIL"
,
client
.
name
,
e
.
toString
())
if
!
client
.
closed
...
...
ygopro-server.js
View file @
14f1b347
...
...
@@ -2726,7 +2726,7 @@
});
ygopro
.
ctos_follow
(
'
JOIN_GAME
'
,
true
,
async
function
(
buffer
,
info
,
client
,
server
,
datas
)
{
var
available_logs
,
check_buffer_indentity
,
create_room_with_action
,
decrypted_buffer
,
duelLog
,
e
,
exactBan
,
i
,
id
,
index
,
j
,
l
,
len
,
len1
,
len2
,
len3
,
m
,
n
,
pre_room
,
recover_match
,
ref
,
ref1
,
replay
,
replay_id
,
replays
,
room
,
secret
,
struct
,
userData
;
var
available_logs
,
check_buffer_indentity
,
create_room_with_action
,
decrypted_buffer
,
duelLog
,
e
,
exactBan
,
i
,
id
,
index
,
j
,
l
,
len
,
len1
,
len2
,
len3
,
m
,
n
,
pre_room
,
recover_match
,
ref
,
ref1
,
replay
,
replay_id
,
replays
,
room
,
secret
,
struct
,
userData
,
userDataRes
,
userUrl
;
//log.info info
info
.
pass
=
info
.
pass
.
trim
();
client
.
pass
=
info
.
pass
;
...
...
@@ -2831,7 +2831,7 @@
return
(
checksum
&
0xFF
)
===
0
;
};
create_room_with_action
=
async
function
(
buffer
,
decrypted_buffer
)
{
var
action
,
e
,
firstByte
,
len2
,
m
,
match_permit
,
name
,
opt0
,
opt1
,
opt2
,
opt3
,
options
,
player
,
ref
,
ref1
,
room
,
room_title
,
title
;
var
action
,
e
,
firstByte
,
len2
,
m
,
match
PermitRes
,
match
_permit
,
name
,
opt0
,
opt1
,
opt2
,
opt3
,
options
,
player
,
ref
,
ref1
,
room
,
room_title
,
title
;
if
(
client
.
closed
)
{
return
;
}
...
...
@@ -2912,12 +2912,12 @@
break
;
case
4
:
if
(
settings
.
modules
.
arena_mode
.
check_permit
)
{
match_permit
=
null
;
try
{
match
_permit
=
(
await
(
axios
.
get
(
settings
.
modules
.
arena_mode
.
check_permit
,
{
match
PermitRes
=
(
await
axios
.
get
(
settings
.
modules
.
arena_mode
.
check_permit
,
{
responseType
:
'
json
'
,
timeout
:
3000
})).
data
);
}));
match_permit
=
matchPermitRes
.
data
;
}
catch
(
error1
)
{
e
=
error1
;
log
.
warn
(
`match permit fail
${
e
.
toString
()}
`
);
...
...
@@ -2983,10 +2983,14 @@
}
}
try
{
userData
=
(
await
(
axios
.
get
(
`
${
settings
.
modules
.
mycard
.
auth_base_url
}
/users/
${
encodeURIComponent
(
client
.
name
)}
.json`
,
{
userUrl
=
`
${
settings
.
modules
.
mycard
.
auth_base_url
}
/users/
${
encodeURIComponent
(
client
.
name
)}
.json`
;
console
.
log
(
userUrl
);
userDataRes
=
(
await
axios
.
get
(
userUrl
,
{
responseType
:
'
json
'
,
timeout
:
10000
})).
data
);
}));
userData
=
userDataRes
.
data
;
console
.
log
(
userData
);
}
catch
(
error1
)
{
e
=
error1
;
log
.
warn
(
"
READ USER FAIL
"
,
client
.
name
,
e
.
toString
());
...
...
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