Commit 2a1ef466 authored by mercury233's avatar mercury233

decline create room when memory full( for test, 10% )

parent 31f063ab
...@@ -189,6 +189,15 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ...@@ -189,6 +189,15 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
code: 2 code: 2
} }
client.end() client.end()
else if (os.freemem() / os.totalmem())>=0.1
ygopro.stoc_send_chat(client,"服务器已经爆满,请稍候再试")
ygopro.stoc_send client, 'ERROR_MSG',{
msg: 1
code: 2
}
client.end()
else if !Room.validate(info.pass) else if !Room.validate(info.pass)
#ygopro.stoc_send client, 'ERROR_MSG',{ #ygopro.stoc_send client, 'ERROR_MSG',{
# msg: 1 # msg: 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment