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
1f3acf10
Commit
1f3acf10
authored
Aug 10, 2015
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix mem percent..i'm SB
parent
d7ce1eda
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ygopro-server.coffee
ygopro-server.coffee
+2
-2
ygopro-server.js
ygopro-server.js
+2
-2
No files found.
ygopro-server.coffee
View file @
1f3acf10
...
@@ -191,7 +191,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
...
@@ -191,7 +191,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
}
}
client
.
end
()
client
.
end
()
else
if
(
os
.
freemem
()
/
os
.
totalmem
())
>=
0.9
else
if
(
os
.
freemem
()
/
os
.
totalmem
())
<=
0.1
ygopro
.
stoc_send_chat
(
client
,
"服务器已经爆满,请稍候再试"
)
ygopro
.
stoc_send_chat
(
client
,
"服务器已经爆满,请稍候再试"
)
ygopro
.
stoc_send
client
,
'ERROR_MSG'
,{
ygopro
.
stoc_send
client
,
'ERROR_MSG'
,{
msg
:
1
msg
:
1
...
@@ -242,7 +242,7 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)->
...
@@ -242,7 +242,7 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)->
#欢迎信息
#欢迎信息
if
settings
.
modules
.
welcome
if
settings
.
modules
.
welcome
ygopro
.
stoc_send_chat
client
,
settings
.
modules
.
welcome
ygopro
.
stoc_send_chat
client
,
settings
.
modules
.
welcome
if
(
os
.
freemem
()
/
os
.
totalmem
())
>=
0.9
if
(
os
.
freemem
()
/
os
.
totalmem
())
<=
0.1
ygopro
.
stoc_send_chat
client
,
"服务器已经爆满,随时存在崩溃风险!"
ygopro
.
stoc_send_chat
client
,
"服务器已经爆满,随时存在崩溃风险!"
if
settings
.
modules
.
database
if
settings
.
modules
.
database
if
_
.
startsWith
(
client
.
room
.
name
,
'M#'
)
if
_
.
startsWith
(
client
.
room
.
name
,
'M#'
)
...
...
ygopro-server.js
View file @
1f3acf10
...
@@ -238,7 +238,7 @@
...
@@ -238,7 +238,7 @@
code
:
2
code
:
2
});
});
return
client
.
end
();
return
client
.
end
();
}
else
if
((
os
.
freemem
()
/
os
.
totalmem
())
>=
0.9
)
{
}
else
if
((
os
.
freemem
()
/
os
.
totalmem
())
<=
0.1
)
{
ygopro
.
stoc_send_chat
(
client
,
"
服务器已经爆满,请稍候再试
"
);
ygopro
.
stoc_send_chat
(
client
,
"
服务器已经爆满,请稍候再试
"
);
ygopro
.
stoc_send
(
client
,
'
ERROR_MSG
'
,
{
ygopro
.
stoc_send
(
client
,
'
ERROR_MSG
'
,
{
msg
:
1
,
msg
:
1
,
...
@@ -291,7 +291,7 @@
...
@@ -291,7 +291,7 @@
if
(
settings
.
modules
.
welcome
)
{
if
(
settings
.
modules
.
welcome
)
{
ygopro
.
stoc_send_chat
(
client
,
settings
.
modules
.
welcome
);
ygopro
.
stoc_send_chat
(
client
,
settings
.
modules
.
welcome
);
}
}
if
((
os
.
freemem
()
/
os
.
totalmem
())
>=
0.9
)
{
if
((
os
.
freemem
()
/
os
.
totalmem
())
<=
0.1
)
{
ygopro
.
stoc_send_chat
(
client
,
"
服务器已经爆满,随时存在崩溃风险!
"
);
ygopro
.
stoc_send_chat
(
client
,
"
服务器已经爆满,随时存在崩溃风险!
"
);
}
}
if
(
settings
.
modules
.
database
)
{
if
(
settings
.
modules
.
database
)
{
...
...
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