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
4e8e35b9
Commit
4e8e35b9
authored
Aug 18, 2021
by
mercury233
Committed by
GitHub
Aug 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init badword and i18n regex only once (#43)
parent
55afc8da
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
87 additions
and
122 deletions
+87
-122
ygopro-server.coffee
ygopro-server.coffee
+18
-42
ygopro-server.js
ygopro-server.js
+20
-53
ygopro.coffee
ygopro.coffee
+11
-3
ygopro.js
ygopro.js
+38
-24
No files found.
ygopro-server.coffee
View file @
4e8e35b9
...
@@ -178,6 +178,7 @@ settings = {}
...
@@ -178,6 +178,7 @@ settings = {}
tips
=
null
tips
=
null
dialogues
=
null
dialogues
=
null
badwords
=
null
badwords
=
null
badwordR
=
null
lflists
=
global
.
lflists
=
[]
lflists
=
global
.
lflists
=
[]
real_windbot_server_ip
=
null
real_windbot_server_ip
=
null
long_resolve_cards
=
[]
long_resolve_cards
=
[]
...
@@ -380,6 +381,13 @@ init = () ->
...
@@ -380,6 +381,13 @@ init = () ->
await
loadLFList
(
'ygopro/expansions/lflist.conf'
)
await
loadLFList
(
'ygopro/expansions/lflist.conf'
)
await
loadLFList
(
'ygopro/lflist.conf'
)
await
loadLFList
(
'ygopro/lflist.conf'
)
badwordR
=
global
.
badwordR
=
{}
badwordR
.
level0
=
new
RegExp
(
'(?:'
+
badwords
.
level0
.
join
(
')|(?:'
)
+
')'
,
'i'
);
badwordR
.
level1
=
new
RegExp
(
'(?:'
+
badwords
.
level1
.
join
(
')|(?:'
)
+
')'
,
'i'
);
badwordR
.
level1g
=
new
RegExp
(
'(?:'
+
badwords
.
level1
.
join
(
')|(?:'
)
+
')'
,
'ig'
);
badwordR
.
level2
=
new
RegExp
(
'(?:'
+
badwords
.
level2
.
join
(
')|(?:'
)
+
')'
,
'i'
);
badwordR
.
level3
=
new
RegExp
(
'(?:'
+
badwords
.
level3
.
join
(
')|(?:'
)
+
')'
,
'i'
);
setInterval
()
->
setInterval
()
->
moment_now
=
moment
()
moment_now
=
moment
()
moment_now_string
=
moment_now
.
format
()
moment_now_string
=
moment_now
.
format
()
...
@@ -2151,24 +2159,15 @@ ygopro.ctos_follow 'JOIN_GAME', true, (buffer, info, client, server, datas)->
...
@@ -2151,24 +2159,15 @@ ygopro.ctos_follow 'JOIN_GAME', true, (buffer, info, client, server, datas)->
}
}
options
.
lflist
=
_
.
findIndex
lflists
,
(
list
)
->
((
options
.
rule
==
1
)
==
list
.
tcg
)
and
list
.
date
.
isBefore
()
options
.
lflist
=
_
.
findIndex
lflists
,
(
list
)
->
((
options
.
rule
==
1
)
==
list
.
tcg
)
and
list
.
date
.
isBefore
()
room_title
=
info
.
pass
.
slice
(
8
).
replace
(
String
.
fromCharCode
(
0xFEFF
),
' '
)
room_title
=
info
.
pass
.
slice
(
8
).
replace
(
String
.
fromCharCode
(
0xFEFF
),
' '
)
if
_
.
any
(
badwords
.
level3
,
(
badword
)
->
if
badwordR
.
level3
.
test
(
room_title
)
regexp
=
new
RegExp
(
badword
,
'i'
)
return
room_title
.
match
(
regexp
)
,
room_title
)
log
.
warn
(
"BAD ROOM NAME LEVEL 3"
,
room_title
,
client
.
name
,
client
.
ip
)
log
.
warn
(
"BAD ROOM NAME LEVEL 3"
,
room_title
,
client
.
name
,
client
.
ip
)
ygopro
.
stoc_die
(
client
,
"${bad_roomname_level3}"
)
ygopro
.
stoc_die
(
client
,
"${bad_roomname_level3}"
)
return
return
else
if
_
.
any
(
badwords
.
level2
,
(
badword
)
->
else
if
badwordR
.
level2
.
test
(
room_title
)
regexp
=
new
RegExp
(
badword
,
'i'
)
return
room_title
.
match
(
regexp
)
,
room_title
)
log
.
warn
(
"BAD ROOM NAME LEVEL 2"
,
room_title
,
client
.
name
,
client
.
ip
)
log
.
warn
(
"BAD ROOM NAME LEVEL 2"
,
room_title
,
client
.
name
,
client
.
ip
)
ygopro
.
stoc_die
(
client
,
"${bad_roomname_level2}"
)
ygopro
.
stoc_die
(
client
,
"${bad_roomname_level2}"
)
return
return
else
if
_
.
any
(
badwords
.
level1
,
(
badword
)
->
else
if
badwordR
.
level1
.
test
(
room_title
)
regexp
=
new
RegExp
(
badword
,
'i'
)
return
room_title
.
match
(
regexp
)
,
room_title
)
log
.
warn
(
"BAD ROOM NAME LEVEL 1"
,
room_title
,
client
.
name
,
client
.
ip
)
log
.
warn
(
"BAD ROOM NAME LEVEL 1"
,
room_title
,
client
.
name
,
client
.
ip
)
ygopro
.
stoc_die
(
client
,
"${bad_roomname_level1}"
)
ygopro
.
stoc_die
(
client
,
"${bad_roomname_level1}"
)
return
return
...
@@ -2383,24 +2382,15 @@ ygopro.ctos_follow 'JOIN_GAME', true, (buffer, info, client, server, datas)->
...
@@ -2383,24 +2382,15 @@ ygopro.ctos_follow 'JOIN_GAME', true, (buffer, info, client, server, datas)->
log
.
warn
(
"MULTI LOGIN"
,
client
.
name
,
client
.
ip
)
log
.
warn
(
"MULTI LOGIN"
,
client
.
name
,
client
.
ip
)
ygopro
.
stoc_die
(
client
,
"${too_much_connection}"
+
client
.
ip
)
ygopro
.
stoc_die
(
client
,
"${too_much_connection}"
+
client
.
ip
)
else
if
!
settings
.
modules
.
tournament_mode
.
enabled
and
!
settings
.
modules
.
challonge
.
enabled
and
_
.
any
(
badwords
.
level3
,
(
badword
)
->
else
if
!
settings
.
modules
.
tournament_mode
.
enabled
and
!
settings
.
modules
.
challonge
.
enabled
and
badwordR
.
level3
.
test
(
client
.
name
)
regexp
=
new
RegExp
(
badword
,
'i'
)
return
name
.
match
(
regexp
)
,
name
=
client
.
name
)
log
.
warn
(
"BAD NAME LEVEL 3"
,
client
.
name
,
client
.
ip
)
log
.
warn
(
"BAD NAME LEVEL 3"
,
client
.
name
,
client
.
ip
)
ygopro
.
stoc_die
(
client
,
"${bad_name_level3}"
)
ygopro
.
stoc_die
(
client
,
"${bad_name_level3}"
)
else
if
!
settings
.
modules
.
tournament_mode
.
enabled
and
!
settings
.
modules
.
challonge
.
enabled
and
_
.
any
(
badwords
.
level2
,
(
badword
)
->
else
if
!
settings
.
modules
.
tournament_mode
.
enabled
and
!
settings
.
modules
.
challonge
.
enabled
and
badwordR
.
level2
.
test
(
client
.
name
)
regexp
=
new
RegExp
(
badword
,
'i'
)
return
name
.
match
(
regexp
)
,
name
=
client
.
name
)
log
.
warn
(
"BAD NAME LEVEL 2"
,
client
.
name
,
client
.
ip
)
log
.
warn
(
"BAD NAME LEVEL 2"
,
client
.
name
,
client
.
ip
)
ygopro
.
stoc_die
(
client
,
"${bad_name_level2}"
)
ygopro
.
stoc_die
(
client
,
"${bad_name_level2}"
)
else
if
!
settings
.
modules
.
tournament_mode
.
enabled
and
!
settings
.
modules
.
challonge
.
enabled
and
_
.
any
(
badwords
.
level1
,
(
badword
)
->
else
if
!
settings
.
modules
.
tournament_mode
.
enabled
and
!
settings
.
modules
.
challonge
.
enabled
and
badwordR
.
level1
.
test
(
client
.
name
)
regexp
=
new
RegExp
(
badword
,
'i'
)
return
name
.
match
(
regexp
)
,
name
=
client
.
name
)
log
.
warn
(
"BAD NAME LEVEL 1"
,
client
.
name
,
client
.
ip
)
log
.
warn
(
"BAD NAME LEVEL 1"
,
client
.
name
,
client
.
ip
)
ygopro
.
stoc_die
(
client
,
"${bad_name_level1}"
)
ygopro
.
stoc_die
(
client
,
"${bad_name_level1}"
)
...
@@ -3192,10 +3182,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server, datas)->
...
@@ -3192,10 +3182,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server, datas)->
ygopro
.
stoc_send_chat
(
client
,
"${banned_chat_tip}"
+
(
if
client
.
ban_mc
and
client
.
ban_mc
.
message
then
(
": "
+
client
.
ban_mc
.
message
)
else
""
),
ygopro
.
constants
.
COLORS
.
RED
)
ygopro
.
stoc_send_chat
(
client
,
"${banned_chat_tip}"
+
(
if
client
.
ban_mc
and
client
.
ban_mc
.
message
then
(
": "
+
client
.
ban_mc
.
message
)
else
""
),
ygopro
.
constants
.
COLORS
.
RED
)
return
true
return
true
oldmsg
=
msg
oldmsg
=
msg
if
(
_
.
any
(
badwords
.
level3
,
(
badword
)
->
if
badwordR
.
level3
.
test
(
msg
)
regexp
=
new
RegExp
(
badword
,
'i'
)
return
msg
.
match
(
regexp
)
,
msg
))
log
.
warn
"BAD WORD LEVEL 3"
,
client
.
name
,
client
.
ip
,
oldmsg
,
RegExp
.
$1
log
.
warn
"BAD WORD LEVEL 3"
,
client
.
name
,
client
.
ip
,
oldmsg
,
RegExp
.
$1
report_to_big_brother
room
.
name
,
client
.
name
,
client
.
ip
,
3
,
oldmsg
,
RegExp
.
$1
report_to_big_brother
room
.
name
,
client
.
name
,
client
.
ip
,
3
,
oldmsg
,
RegExp
.
$1
cancel
=
true
cancel
=
true
...
@@ -3221,22 +3208,14 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server, datas)->
...
@@ -3221,22 +3208,14 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server, datas)->
client
.
abuse_count
=
client
.
abuse_count
+
2
client
.
abuse_count
=
client
.
abuse_count
+
2
ygopro
.
stoc_send_chat
(
client
,
"${chat_warn_level0}"
,
ygopro
.
constants
.
COLORS
.
RED
)
ygopro
.
stoc_send_chat
(
client
,
"${chat_warn_level0}"
,
ygopro
.
constants
.
COLORS
.
RED
)
cancel
=
true
cancel
=
true
else
if
(
_
.
any
(
badwords
.
level2
,
(
badword
)
->
else
if
badwordR
.
level2
.
test
(
msg
)
regexp
=
new
RegExp
(
badword
,
'i'
)
return
msg
.
match
(
regexp
)
,
msg
))
log
.
warn
"BAD WORD LEVEL 2"
,
client
.
name
,
client
.
ip
,
oldmsg
,
RegExp
.
$1
log
.
warn
"BAD WORD LEVEL 2"
,
client
.
name
,
client
.
ip
,
oldmsg
,
RegExp
.
$1
report_to_big_brother
room
.
name
,
client
.
name
,
client
.
ip
,
2
,
oldmsg
,
RegExp
.
$1
report_to_big_brother
room
.
name
,
client
.
name
,
client
.
ip
,
2
,
oldmsg
,
RegExp
.
$1
client
.
abuse_count
=
client
.
abuse_count
+
3
client
.
abuse_count
=
client
.
abuse_count
+
3
ygopro
.
stoc_send_chat
(
client
,
"${chat_warn_level2}"
,
ygopro
.
constants
.
COLORS
.
RED
)
ygopro
.
stoc_send_chat
(
client
,
"${chat_warn_level2}"
,
ygopro
.
constants
.
COLORS
.
RED
)
cancel
=
true
cancel
=
true
else
else
_
.
each
(
badwords
.
level1
,
(
badword
)
->
msg
=
msg
.
replace
(
badwordR
.
level1g
,
'**'
)
#log.info msg
regexp
=
new
RegExp
(
badword
,
"ig"
)
msg
=
msg
.
replace
(
regexp
,
"**"
)
return
,
msg
)
if
oldmsg
!=
msg
if
oldmsg
!=
msg
log
.
warn
"BAD WORD LEVEL 1"
,
client
.
name
,
client
.
ip
,
oldmsg
,
RegExp
.
$1
log
.
warn
"BAD WORD LEVEL 1"
,
client
.
name
,
client
.
ip
,
oldmsg
,
RegExp
.
$1
report_to_big_brother
room
.
name
,
client
.
name
,
client
.
ip
,
1
,
oldmsg
,
RegExp
.
$1
report_to_big_brother
room
.
name
,
client
.
name
,
client
.
ip
,
1
,
oldmsg
,
RegExp
.
$1
...
@@ -3246,10 +3225,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server, datas)->
...
@@ -3246,10 +3225,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server, datas)->
struct
.
_setBuff
(
buffer
)
struct
.
_setBuff
(
buffer
)
struct
.
set
(
"msg"
,
msg
)
struct
.
set
(
"msg"
,
msg
)
buffer
=
struct
.
buffer
buffer
=
struct
.
buffer
else
if
(
_
.
any
(
badwords
.
level0
,
(
badword
)
->
else
if
badwordR
.
level0
.
test
(
msg
)
regexp
=
new
RegExp
(
badword
,
'i'
)
return
msg
.
match
(
regexp
)
,
msg
))
log
.
info
"BAD WORD LEVEL 0"
,
client
.
name
,
client
.
ip
,
oldmsg
,
RegExp
.
$1
log
.
info
"BAD WORD LEVEL 0"
,
client
.
name
,
client
.
ip
,
oldmsg
,
RegExp
.
$1
report_to_big_brother
room
.
name
,
client
.
name
,
client
.
ip
,
0
,
oldmsg
,
RegExp
.
$1
report_to_big_brother
room
.
name
,
client
.
name
,
client
.
ip
,
0
,
oldmsg
,
RegExp
.
$1
if
client
.
abuse_count
>=
2
if
client
.
abuse_count
>=
2
...
...
ygopro-server.js
View file @
4e8e35b9
This diff is collapsed.
Click to expand it.
ygopro.coffee
View file @
4e8e35b9
...
@@ -7,6 +7,15 @@ loadJSON = require('load-json-file').sync
...
@@ -7,6 +7,15 @@ loadJSON = require('load-json-file').sync
@
i18ns
=
loadJSON
'./data/i18n.json'
@
i18ns
=
loadJSON
'./data/i18n.json'
@
i18nR
=
{}
for
lang
,
data
of
@
i18ns
@
i18nR
[
lang
]
=
{}
for
key
,
text
of
data
@
i18nR
[
lang
][
key
]
=
{
regex
:
new
RegExp
(
"
\\
$
\\
{"
+
key
+
"
\\
}"
,
'g'
),
text
:
text
}
YGOProMessagesHelper
=
require
(
"./YGOProMessages.js"
).
YGOProMessagesHelper
# 为 SRVPro2 准备的库,这里拿这个库只用来测试,SRVPro1 对异步支持不是特别完善,因此不会有很多异步优化
YGOProMessagesHelper
=
require
(
"./YGOProMessages.js"
).
YGOProMessagesHelper
# 为 SRVPro2 准备的库,这里拿这个库只用来测试,SRVPro1 对异步支持不是特别完善,因此不会有很多异步优化
@
helper
=
new
YGOProMessagesHelper
()
@
helper
=
new
YGOProMessagesHelper
()
...
@@ -54,9 +63,8 @@ translateHandler = (handler) ->
...
@@ -54,9 +63,8 @@ translateHandler = (handler) ->
for
line
in
_
.
lines
(
msg
)
for
line
in
_
.
lines
(
msg
)
if
player
>=
10
if
player
>=
10
line
=
"[Server]: "
+
line
line
=
"[Server]: "
+
line
for
o
,
r
of
@
i18ns
[
client
.
lang
]
for
o
,
r
of
@
i18nR
[
client
.
lang
]
re
=
new
RegExp
(
"
\\
$
\\
{"
+
o
+
"
\\
}"
,
'g'
)
line
=
line
.
replace
(
r
.
regex
,
r
.
text
)
line
=
line
.
replace
(
re
,
r
)
@
stoc_send
client
,
'CHAT'
,
{
@
stoc_send
client
,
'CHAT'
,
{
player
:
player
player
:
player
msg
:
line
msg
:
line
...
...
ygopro.js
View file @
4e8e35b9
// Generated by CoffeeScript 2.5.1
// Generated by CoffeeScript 2.5.1
(
function
()
{
(
function
()
{
var
Struct
,
YGOProMessagesHelper
,
_
,
loadJSON
,
translateHandler
;
var
Struct
,
YGOProMessagesHelper
,
_
,
data
,
key
,
lang
,
loadJSON
,
ref
,
text
,
translateHandler
;
_
=
require
(
'
underscore
'
);
_
=
require
(
'
underscore
'
);
...
@@ -14,6 +14,21 @@
...
@@ -14,6 +14,21 @@
this
.
i18ns
=
loadJSON
(
'
./data/i18n.json
'
);
this
.
i18ns
=
loadJSON
(
'
./data/i18n.json
'
);
this
.
i18nR
=
{};
ref
=
this
.
i18ns
;
for
(
lang
in
ref
)
{
data
=
ref
[
lang
];
this
.
i18nR
[
lang
]
=
{};
for
(
key
in
data
)
{
text
=
data
[
key
];
this
.
i18nR
[
lang
][
key
]
=
{
regex
:
new
RegExp
(
"
\\
$
\\
{
"
+
key
+
"
\\
}
"
,
'
g
'
),
text
:
text
};
}
}
YGOProMessagesHelper
=
require
(
"
./YGOProMessages.js
"
).
YGOProMessagesHelper
;
// 为 SRVPro2 准备的库,这里拿这个库只用来测试,SRVPro1 对异步支持不是特别完善,因此不会有很多异步优化
YGOProMessagesHelper
=
require
(
"
./YGOProMessages.js
"
).
YGOProMessagesHelper
;
// 为 SRVPro2 准备的库,这里拿这个库只用来测试,SRVPro1 对异步支持不是特别完善,因此不会有很多异步优化
this
.
helper
=
new
YGOProMessagesHelper
();
this
.
helper
=
new
YGOProMessagesHelper
();
...
@@ -69,22 +84,21 @@
...
@@ -69,22 +84,21 @@
//util
//util
this
.
stoc_send_chat
=
function
(
client
,
msg
,
player
=
8
)
{
this
.
stoc_send_chat
=
function
(
client
,
msg
,
player
=
8
)
{
var
i
,
len
,
line
,
o
,
r
,
re
,
ref
,
ref1
;
var
i
,
len
,
line
,
o
,
r
,
re
f1
,
ref2
;
if
(
!
client
)
{
if
(
!
client
)
{
console
.
log
(
"
err stoc_send_chat
"
);
console
.
log
(
"
err stoc_send_chat
"
);
return
;
return
;
}
}
ref
=
_
.
lines
(
msg
);
ref
1
=
_
.
lines
(
msg
);
for
(
i
=
0
,
len
=
ref
.
length
;
i
<
len
;
i
++
)
{
for
(
i
=
0
,
len
=
ref
1
.
length
;
i
<
len
;
i
++
)
{
line
=
ref
[
i
];
line
=
ref
1
[
i
];
if
(
player
>=
10
)
{
if
(
player
>=
10
)
{
line
=
"
[Server]:
"
+
line
;
line
=
"
[Server]:
"
+
line
;
}
}
ref1
=
this
.
i18ns
[
client
.
lang
];
ref2
=
this
.
i18nR
[
client
.
lang
];
for
(
o
in
ref1
)
{
for
(
o
in
ref2
)
{
r
=
ref1
[
o
];
r
=
ref2
[
o
];
re
=
new
RegExp
(
"
\\
$
\\
{
"
+
o
+
"
\\
}
"
,
'
g
'
);
line
=
line
.
replace
(
r
.
regex
,
r
.
text
);
line
=
line
.
replace
(
re
,
r
);
}
}
this
.
stoc_send
(
client
,
'
CHAT
'
,
{
this
.
stoc_send
(
client
,
'
CHAT
'
,
{
player
:
player
,
player
:
player
,
...
@@ -94,21 +108,21 @@
...
@@ -94,21 +108,21 @@
};
};
this
.
stoc_send_chat_to_room
=
function
(
room
,
msg
,
player
=
8
)
{
this
.
stoc_send_chat_to_room
=
function
(
room
,
msg
,
player
=
8
)
{
var
client
,
i
,
j
,
len
,
len1
,
ref
,
ref1
;
var
client
,
i
,
j
,
len
,
len1
,
ref
1
,
ref2
;
if
(
!
room
)
{
if
(
!
room
)
{
console
.
log
(
"
err stoc_send_chat_to_room
"
);
console
.
log
(
"
err stoc_send_chat_to_room
"
);
return
;
return
;
}
}
ref
=
room
.
players
;
ref
1
=
room
.
players
;
for
(
i
=
0
,
len
=
ref
.
length
;
i
<
len
;
i
++
)
{
for
(
i
=
0
,
len
=
ref
1
.
length
;
i
<
len
;
i
++
)
{
client
=
ref
[
i
];
client
=
ref
1
[
i
];
if
(
client
)
{
if
(
client
)
{
this
.
stoc_send_chat
(
client
,
msg
,
player
);
this
.
stoc_send_chat
(
client
,
msg
,
player
);
}
}
}
}
ref
1
=
room
.
watchers
;
ref
2
=
room
.
watchers
;
for
(
j
=
0
,
len1
=
ref
1
.
length
;
j
<
len1
;
j
++
)
{
for
(
j
=
0
,
len1
=
ref
2
.
length
;
j
<
len1
;
j
++
)
{
client
=
ref
1
[
j
];
client
=
ref
2
[
j
];
if
(
client
)
{
if
(
client
)
{
this
.
stoc_send_chat
(
client
,
msg
,
player
);
this
.
stoc_send_chat
(
client
,
msg
,
player
);
}
}
...
@@ -116,14 +130,14 @@
...
@@ -116,14 +130,14 @@
};
};
this
.
stoc_send_hint_card_to_room
=
function
(
room
,
card
)
{
this
.
stoc_send_hint_card_to_room
=
function
(
room
,
card
)
{
var
client
,
i
,
j
,
len
,
len1
,
ref
,
ref1
;
var
client
,
i
,
j
,
len
,
len1
,
ref
1
,
ref2
;
if
(
!
room
)
{
if
(
!
room
)
{
console
.
log
(
"
err stoc_send_hint_card_to_room
"
);
console
.
log
(
"
err stoc_send_hint_card_to_room
"
);
return
;
return
;
}
}
ref
=
room
.
players
;
ref
1
=
room
.
players
;
for
(
i
=
0
,
len
=
ref
.
length
;
i
<
len
;
i
++
)
{
for
(
i
=
0
,
len
=
ref
1
.
length
;
i
<
len
;
i
++
)
{
client
=
ref
[
i
];
client
=
ref
1
[
i
];
if
(
client
)
{
if
(
client
)
{
this
.
stoc_send
(
client
,
'
GAME_MSG
'
,
{
this
.
stoc_send
(
client
,
'
GAME_MSG
'
,
{
curmsg
:
2
,
curmsg
:
2
,
...
@@ -133,9 +147,9 @@
...
@@ -133,9 +147,9 @@
});
});
}
}
}
}
ref
1
=
room
.
watchers
;
ref
2
=
room
.
watchers
;
for
(
j
=
0
,
len1
=
ref
1
.
length
;
j
<
len1
;
j
++
)
{
for
(
j
=
0
,
len1
=
ref
2
.
length
;
j
<
len1
;
j
++
)
{
client
=
ref
1
[
j
];
client
=
ref
2
[
j
];
if
(
client
)
{
if
(
client
)
{
this
.
stoc_send
(
client
,
'
GAME_MSG
'
,
{
this
.
stoc_send
(
client
,
'
GAME_MSG
'
,
{
curmsg
:
2
,
curmsg
:
2
,
...
...
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