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
8664ea59
Commit
8664ea59
authored
Jul 16, 2016
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
db1c8950
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
ygopro-server.coffee
ygopro-server.coffee
+6
-6
ygopro-server.js
ygopro-server.js
+6
-6
No files found.
ygopro-server.coffee
View file @
8664ea59
...
@@ -961,21 +961,21 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
...
@@ -961,21 +961,21 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
ygopro
.
stoc_die
(
client
,
"您的账号已被封禁"
)
ygopro
.
stoc_die
(
client
,
"您的账号已被封禁"
)
else
if
_
.
any
(
settings
.
ban
.
badword_level3
,
(
badword
)
->
else
if
_
.
any
(
settings
.
ban
.
badword_level3
,
(
badword
)
->
regexp
=
new
RegExp
(
badword
)
regexp
=
new
RegExp
(
badword
,
'i'
)
return
name
.
match
(
regexp
)
return
name
.
match
(
regexp
)
,
name
=
client
.
name
)
,
name
=
client
.
name
)
log
.
warn
(
"BAD NAME LEVEL 3"
,
client
.
name
,
client
.
remoteAddress
)
log
.
warn
(
"BAD NAME LEVEL 3"
,
client
.
name
,
client
.
remoteAddress
)
ygopro
.
stoc_die
(
client
,
"您的用户名存在不适当的内容"
)
ygopro
.
stoc_die
(
client
,
"您的用户名存在不适当的内容"
)
else
if
_
.
any
(
settings
.
ban
.
badword_level2
,
(
badword
)
->
else
if
_
.
any
(
settings
.
ban
.
badword_level2
,
(
badword
)
->
regexp
=
new
RegExp
(
badword
)
regexp
=
new
RegExp
(
badword
,
'i'
)
return
name
.
match
(
regexp
)
return
name
.
match
(
regexp
)
,
name
=
client
.
name
)
,
name
=
client
.
name
)
log
.
warn
(
"BAD NAME LEVEL 2"
,
client
.
name
,
client
.
remoteAddress
)
log
.
warn
(
"BAD NAME LEVEL 2"
,
client
.
name
,
client
.
remoteAddress
)
ygopro
.
stoc_die
(
client
,
"您的用户名存在不适当的内容"
)
ygopro
.
stoc_die
(
client
,
"您的用户名存在不适当的内容"
)
else
if
_
.
any
(
settings
.
ban
.
badword_level1
,
(
badword
)
->
else
if
_
.
any
(
settings
.
ban
.
badword_level1
,
(
badword
)
->
regexp
=
new
RegExp
(
badword
)
regexp
=
new
RegExp
(
badword
,
'i'
)
return
name
.
match
(
regexp
)
return
name
.
match
(
regexp
)
,
name
=
client
.
name
)
,
name
=
client
.
name
)
log
.
warn
(
"BAD NAME LEVEL 1"
,
client
.
name
,
client
.
remoteAddress
)
log
.
warn
(
"BAD NAME LEVEL 1"
,
client
.
name
,
client
.
remoteAddress
)
...
@@ -1298,7 +1298,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)->
...
@@ -1298,7 +1298,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)->
return
cancel
return
cancel
oldmsg
=
msg
oldmsg
=
msg
if
(
_
.
any
(
settings
.
ban
.
badword_level3
,
(
badword
)
->
if
(
_
.
any
(
settings
.
ban
.
badword_level3
,
(
badword
)
->
regexp
=
new
RegExp
(
badword
)
regexp
=
new
RegExp
(
badword
,
'i'
)
return
msg
.
match
(
regexp
)
return
msg
.
match
(
regexp
)
,
msg
))
,
msg
))
log
.
warn
"BAD WORD LEVEL 3"
,
client
.
name
,
client
.
remoteAddress
,
oldmsg
log
.
warn
"BAD WORD LEVEL 3"
,
client
.
name
,
client
.
remoteAddress
,
oldmsg
...
@@ -1308,7 +1308,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)->
...
@@ -1308,7 +1308,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)->
client
.
end
()
client
.
end
()
cancel
=
true
cancel
=
true
else
if
(
_
.
any
(
settings
.
ban
.
badword_level2
,
(
badword
)
->
else
if
(
_
.
any
(
settings
.
ban
.
badword_level2
,
(
badword
)
->
regexp
=
new
RegExp
(
badword
)
regexp
=
new
RegExp
(
badword
,
'i'
)
return
msg
.
match
(
regexp
)
return
msg
.
match
(
regexp
)
,
msg
))
,
msg
))
log
.
warn
"BAD WORD LEVEL 2"
,
client
.
name
,
client
.
remoteAddress
,
oldmsg
log
.
warn
"BAD WORD LEVEL 2"
,
client
.
name
,
client
.
remoteAddress
,
oldmsg
...
@@ -1318,7 +1318,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)->
...
@@ -1318,7 +1318,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)->
else
else
_
.
each
(
settings
.
ban
.
badword_level1
,
(
badword
)
->
_
.
each
(
settings
.
ban
.
badword_level1
,
(
badword
)
->
#log.info msg
#log.info msg
regexp
=
new
RegExp
(
badword
,
"g"
)
regexp
=
new
RegExp
(
badword
,
"
i
g"
)
msg
=
msg
.
replace
(
regexp
,
"**"
)
msg
=
msg
.
replace
(
regexp
,
"**"
)
return
return
,
msg
)
,
msg
)
...
...
ygopro-server.js
View file @
8664ea59
...
@@ -1180,21 +1180,21 @@
...
@@ -1180,21 +1180,21 @@
ygopro
.
stoc_die
(
client
,
"
您的账号已被封禁
"
);
ygopro
.
stoc_die
(
client
,
"
您的账号已被封禁
"
);
}
else
if
(
_
.
any
(
settings
.
ban
.
badword_level3
,
function
(
badword
)
{
}
else
if
(
_
.
any
(
settings
.
ban
.
badword_level3
,
function
(
badword
)
{
var
regexp
;
var
regexp
;
regexp
=
new
RegExp
(
badword
);
regexp
=
new
RegExp
(
badword
,
'
i
'
);
return
name
.
match
(
regexp
);
return
name
.
match
(
regexp
);
},
name
=
client
.
name
))
{
},
name
=
client
.
name
))
{
log
.
warn
(
"
BAD NAME LEVEL 3
"
,
client
.
name
,
client
.
remoteAddress
);
log
.
warn
(
"
BAD NAME LEVEL 3
"
,
client
.
name
,
client
.
remoteAddress
);
ygopro
.
stoc_die
(
client
,
"
您的用户名存在不适当的内容
"
);
ygopro
.
stoc_die
(
client
,
"
您的用户名存在不适当的内容
"
);
}
else
if
(
_
.
any
(
settings
.
ban
.
badword_level2
,
function
(
badword
)
{
}
else
if
(
_
.
any
(
settings
.
ban
.
badword_level2
,
function
(
badword
)
{
var
regexp
;
var
regexp
;
regexp
=
new
RegExp
(
badword
);
regexp
=
new
RegExp
(
badword
,
'
i
'
);
return
name
.
match
(
regexp
);
return
name
.
match
(
regexp
);
},
name
=
client
.
name
))
{
},
name
=
client
.
name
))
{
log
.
warn
(
"
BAD NAME LEVEL 2
"
,
client
.
name
,
client
.
remoteAddress
);
log
.
warn
(
"
BAD NAME LEVEL 2
"
,
client
.
name
,
client
.
remoteAddress
);
ygopro
.
stoc_die
(
client
,
"
您的用户名存在不适当的内容
"
);
ygopro
.
stoc_die
(
client
,
"
您的用户名存在不适当的内容
"
);
}
else
if
(
_
.
any
(
settings
.
ban
.
badword_level1
,
function
(
badword
)
{
}
else
if
(
_
.
any
(
settings
.
ban
.
badword_level1
,
function
(
badword
)
{
var
regexp
;
var
regexp
;
regexp
=
new
RegExp
(
badword
);
regexp
=
new
RegExp
(
badword
,
'
i
'
);
return
name
.
match
(
regexp
);
return
name
.
match
(
regexp
);
},
name
=
client
.
name
))
{
},
name
=
client
.
name
))
{
log
.
warn
(
"
BAD NAME LEVEL 1
"
,
client
.
name
,
client
.
remoteAddress
);
log
.
warn
(
"
BAD NAME LEVEL 1
"
,
client
.
name
,
client
.
remoteAddress
);
...
@@ -1615,7 +1615,7 @@
...
@@ -1615,7 +1615,7 @@
oldmsg
=
msg
;
oldmsg
=
msg
;
if
(
_
.
any
(
settings
.
ban
.
badword_level3
,
function
(
badword
)
{
if
(
_
.
any
(
settings
.
ban
.
badword_level3
,
function
(
badword
)
{
var
regexp
;
var
regexp
;
regexp
=
new
RegExp
(
badword
);
regexp
=
new
RegExp
(
badword
,
'
i
'
);
return
msg
.
match
(
regexp
);
return
msg
.
match
(
regexp
);
},
msg
))
{
},
msg
))
{
log
.
warn
(
"
BAD WORD LEVEL 3
"
,
client
.
name
,
client
.
remoteAddress
,
oldmsg
);
log
.
warn
(
"
BAD WORD LEVEL 3
"
,
client
.
name
,
client
.
remoteAddress
,
oldmsg
);
...
@@ -1626,7 +1626,7 @@
...
@@ -1626,7 +1626,7 @@
cancel
=
true
;
cancel
=
true
;
}
else
if
(
_
.
any
(
settings
.
ban
.
badword_level2
,
function
(
badword
)
{
}
else
if
(
_
.
any
(
settings
.
ban
.
badword_level2
,
function
(
badword
)
{
var
regexp
;
var
regexp
;
regexp
=
new
RegExp
(
badword
);
regexp
=
new
RegExp
(
badword
,
'
i
'
);
return
msg
.
match
(
regexp
);
return
msg
.
match
(
regexp
);
},
msg
))
{
},
msg
))
{
log
.
warn
(
"
BAD WORD LEVEL 2
"
,
client
.
name
,
client
.
remoteAddress
,
oldmsg
);
log
.
warn
(
"
BAD WORD LEVEL 2
"
,
client
.
name
,
client
.
remoteAddress
,
oldmsg
);
...
@@ -1636,7 +1636,7 @@
...
@@ -1636,7 +1636,7 @@
}
else
{
}
else
{
_
.
each
(
settings
.
ban
.
badword_level1
,
function
(
badword
)
{
_
.
each
(
settings
.
ban
.
badword_level1
,
function
(
badword
)
{
var
regexp
;
var
regexp
;
regexp
=
new
RegExp
(
badword
,
"
g
"
);
regexp
=
new
RegExp
(
badword
,
"
i
g
"
);
msg
=
msg
.
replace
(
regexp
,
"
**
"
);
msg
=
msg
.
replace
(
regexp
,
"
**
"
);
},
msg
);
},
msg
);
if
(
oldmsg
!==
msg
)
{
if
(
oldmsg
!==
msg
)
{
...
...
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