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
a89f8033
Commit
a89f8033
authored
May 05, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/moecube/srvpro
into mc
parents
fd8a5f21
bb5d4ce7
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
181 additions
and
152 deletions
+181
-152
ygopro-server.coffee
ygopro-server.coffee
+16
-5
ygopro-server.js
ygopro-server.js
+165
-147
No files found.
ygopro-server.coffee
View file @
a89f8033
...
@@ -163,10 +163,21 @@ catch
...
@@ -163,10 +163,21 @@ catch
#settings.version = settings.version_default
#settings.version = settings.version_default
log
.
info
"ygopro version 0x"
+
settings
.
version
.
toString
(
16
),
"(from config)"
log
.
info
"ygopro version 0x"
+
settings
.
version
.
toString
(
16
),
"(from config)"
# load the lflist of current date
# load the lflist of current date
lflists
=
(
for
list
in
fs
.
readFileSync
(
'ygopro/lflist.conf'
,
'utf8'
).
match
(
/!.*/g
)
lflists
=
[]
date
=
list
.
match
(
/!([\d\.]+)/
)
# expansions/lflist
continue
unless
date
try
{
date
:
moment
(
list
.
match
(
/!([\d\.]+)/
)[
1
],
'YYYY.MM.DD'
).
utcOffset
(
"-08:00"
),
tcg
:
list
.
indexOf
(
'TCG'
)
!=
-
1
})
for
list
in
fs
.
readFileSync
(
'ygopro/expansions/lflist.conf'
,
'utf8'
).
match
(
/!.*/g
)
date
=
list
.
match
(
/!([\d\.]+)/
)
continue
unless
date
lflists
.
push
({
date
:
moment
(
list
.
match
(
/!([\d\.]+)/
)[
1
],
'YYYY.MM.DD'
).
utcOffset
(
"-08:00"
),
tcg
:
list
.
indexOf
(
'TCG'
)
!=
-
1
})
catch
# lflist
try
for
list
in
fs
.
readFileSync
(
'ygopro/lflist.conf'
,
'utf8'
).
match
(
/!.*/g
)
date
=
list
.
match
(
/!([\d\.]+)/
)
continue
unless
date
lflists
.
push
({
date
:
moment
(
list
.
match
(
/!([\d\.]+)/
)[
1
],
'YYYY.MM.DD'
).
utcOffset
(
"-08:00"
),
tcg
:
list
.
indexOf
(
'TCG'
)
!=
-
1
})
catch
if
settings
.
modules
.
cloud_replay
.
enabled
if
settings
.
modules
.
cloud_replay
.
enabled
redis
=
require
'redis'
redis
=
require
'redis'
...
@@ -1758,7 +1769,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)->
...
@@ -1758,7 +1769,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)->
client
.
abuse_count
=
client
.
abuse_count
+
2
if
client
.
abuse_count
client
.
abuse_count
=
client
.
abuse_count
+
2
if
client
.
abuse_count
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
if
!
(
room
and
room
.
random_type
)
if
!
(
room
and
(
room
.
random_type
or
room
.
arena
)
)
return
cancel
return
cancel
if
client
.
abuse_count
>=
5
if
client
.
abuse_count
>=
5
log
.
warn
"BANNED CHAT"
,
client
.
name
,
client
.
ip
,
msg
log
.
warn
"BANNED CHAT"
,
client
.
name
,
client
.
ip
,
msg
...
...
ygopro-server.js
View file @
a89f8033
This diff is collapsed.
Click to expand it.
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