mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Add sv_shutdown_when_empty
This commit is contained in:
parent
b797978f5f
commit
7654438033
|
@ -1691,7 +1691,12 @@ int CServer::Run()
|
||||||
|
|
||||||
// wait for incoming data
|
// wait for incoming data
|
||||||
if (NonActive)
|
if (NonActive)
|
||||||
|
{
|
||||||
|
if(g_Config.m_SvShutdownWhenEmpty)
|
||||||
|
m_RunServer = false;
|
||||||
|
else
|
||||||
net_socket_read_wait(m_NetServer.Socket(), 1000);
|
net_socket_read_wait(m_NetServer.Socket(), 1000);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
net_socket_read_wait(m_NetServer.Socket(), 5);
|
net_socket_read_wait(m_NetServer.Socket(), 5);
|
||||||
}
|
}
|
||||||
|
|
|
@ -297,6 +297,7 @@ MACRO_CONFIG_INT(SvSpamMuteDuration, sv_spam_mute_duration, 60, 0, 3600 , CFGFLA
|
||||||
MACRO_CONFIG_INT(SvEvents, sv_events, 1, 0, 1, CFGFLAG_SERVER, "Enable triggering of server events, like the happy eyeemotes on some holidays.")
|
MACRO_CONFIG_INT(SvEvents, sv_events, 1, 0, 1, CFGFLAG_SERVER, "Enable triggering of server events, like the happy eyeemotes on some holidays.")
|
||||||
MACRO_CONFIG_INT(SvRankCheats, sv_rank_cheats, 0, 0, 1, CFGFLAG_SERVER, "Enable ranks after cheats have been used (file based server only)")
|
MACRO_CONFIG_INT(SvRankCheats, sv_rank_cheats, 0, 0, 1, CFGFLAG_SERVER, "Enable ranks after cheats have been used (file based server only)")
|
||||||
MACRO_CONFIG_INT(SvSpoofProtection, sv_spoof_protection, 0, 1, 1, CFGFLAG_SERVER, "Enable spoof protection")
|
MACRO_CONFIG_INT(SvSpoofProtection, sv_spoof_protection, 0, 1, 1, CFGFLAG_SERVER, "Enable spoof protection")
|
||||||
|
MACRO_CONFIG_INT(SvShutdownWhenEmpty, sv_shutdown_when_empty, 0, 0, 1, CFGFLAG_SERVER, "Shutdown server as soon as noone is on it anymore")
|
||||||
|
|
||||||
// netlimit
|
// netlimit
|
||||||
MACRO_CONFIG_INT(SvNetlimit, sv_netlimit, 0, 0, 10000, CFGFLAG_SERVER, "Netlimit: Maximum amount of traffic a client is allowed to use (in kb/s)")
|
MACRO_CONFIG_INT(SvNetlimit, sv_netlimit, 0, 0, 10000, CFGFLAG_SERVER, "Netlimit: Maximum amount of traffic a client is allowed to use (in kb/s)")
|
||||||
|
|
Loading…
Reference in a new issue