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
988789c3
Commit
988789c3
authored
Sep 19, 2024
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix name leak
parent
a21bfcf7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
ygopro-server.coffee
ygopro-server.coffee
+2
-1
ygopro-server.js
ygopro-server.js
+12
-6
No files found.
ygopro-server.coffee
View file @
988789c3
...
...
@@ -2444,7 +2444,8 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server, datas)->
#client.score_shown = true
return
if
settings
.
modules
.
random_duel
.
record_match_scores
and
room
.
random_type
==
'M'
ygopro
.
stoc_send_chat_to_room
(
room
,
await
ROOM_player_get_score
(
client
,
client
.
name
),
ygopro
.
constants
.
COLORS
.
GREEN
)
for
player
in
room
.
players
when
player
.
pos
!=
7
ygopro
.
stoc_send_chat
(
player
,
await
ROOM_player_get_score
(
client
,
room
.
getMaskedPlayerName
(
client
,
player
)),
ygopro
.
constants
.
COLORS
.
GREEN
)
for
player
in
room
.
players
when
player
.
pos
!=
7
and
player
!=
client
ygopro
.
stoc_send_chat
(
client
,
await
ROOM_player_get_score
(
player
,
room
.
getMaskedPlayerName
(
player
,
client
)),
ygopro
.
constants
.
COLORS
.
GREEN
)
if
!
room
.
recorder
...
...
ygopro-server.js
View file @
988789c3
...
...
@@ -3175,7 +3175,7 @@
});
ygopro
.
stoc_follow
(
'
JOIN_GAME
'
,
false
,
async
function
(
buffer
,
info
,
client
,
server
,
datas
)
{
var
j
,
l
en
,
player
,
recorder
,
ref
,
room
,
watcher
;
var
j
,
l
,
len
,
len1
,
player
,
recorder
,
ref
,
ref1
,
room
,
watcher
;
//欢迎信息
room
=
ROOM_all
[
client
.
rid
];
if
(
!
(
room
&&
!
client
.
reconnecting
))
{
...
...
@@ -3212,10 +3212,16 @@
}
//client.score_shown = true
if
(
settings
.
modules
.
random_duel
.
record_match_scores
&&
room
.
random_type
===
'
M
'
)
{
ygopro
.
stoc_send_chat_to_room
(
room
,
(
await
ROOM_player_get_score
(
client
,
client
.
name
)),
ygopro
.
constants
.
COLORS
.
GREEN
);
ref
=
room
.
players
;
for
(
j
=
0
,
len
=
ref
.
length
;
j
<
len
;
j
++
)
{
player
=
ref
[
j
];
if
(
player
.
pos
!==
7
)
{
ygopro
.
stoc_send_chat
(
player
,
(
await
ROOM_player_get_score
(
client
,
room
.
getMaskedPlayerName
(
client
,
player
))),
ygopro
.
constants
.
COLORS
.
GREEN
);
}
}
ref1
=
room
.
players
;
for
(
l
=
0
,
len1
=
ref1
.
length
;
l
<
len1
;
l
++
)
{
player
=
ref1
[
l
];
if
(
player
.
pos
!==
7
&&
player
!==
client
)
{
ygopro
.
stoc_send_chat
(
client
,
(
await
ROOM_player_get_score
(
player
,
room
.
getMaskedPlayerName
(
player
,
client
))),
ygopro
.
constants
.
COLORS
.
GREEN
);
}
...
...
@@ -3253,15 +3259,15 @@
ygopro
.
ctos_send
(
watcher
,
'
HS_TOOBSERVER
'
);
});
watcher
.
on
(
'
data
'
,
function
(
data
)
{
var
l
,
len1
,
ref1
,
w
;
var
l
en2
,
m
,
ref2
,
w
;
room
=
ROOM_all
[
client
.
rid
];
if
(
!
room
)
{
return
;
}
room
.
watcher_buffers
.
push
(
data
);
ref
1
=
room
.
watchers
;
for
(
l
=
0
,
len1
=
ref1
.
length
;
l
<
len1
;
l
++
)
{
w
=
ref
1
[
l
];
ref
2
=
room
.
watchers
;
for
(
m
=
0
,
len2
=
ref2
.
length
;
m
<
len2
;
m
++
)
{
w
=
ref
2
[
m
];
if
(
w
)
{
//a WTF fix
ygopro
.
helper
.
send
(
w
,
data
);
}
...
...
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