including the AFK switch
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5443 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+600
-588
File diff suppressed because it is too large
Load Diff
+12
-3
@@ -800,7 +800,7 @@ extern int wait_afk;
|
||||
|
||||
struct servercommandline
|
||||
{
|
||||
int uprate, serverport, syslogfacility, filethres, syslogthres, maxdemos, maxclients, kickthreshold, banthreshold, verbose, incoming_limit;
|
||||
int uprate, serverport, syslogfacility, filethres, syslogthres, maxdemos, maxclients, kickthreshold, banthreshold, verbose, incoming_limit, afk_limit;
|
||||
const char *ip, *master, *logident, *serverpassword, *adminpasswd, *demopath, *maprot, *pwdfile, *blfile, *nbfile, *infopath, *motdpath, *forbidden;
|
||||
bool logtimestamp;
|
||||
string motd, servdesc_full, servdesc_pre, servdesc_suf, voteperm, mapperm;
|
||||
@@ -808,7 +808,7 @@ struct servercommandline
|
||||
vector<const char *> adminonlymaps;
|
||||
|
||||
servercommandline() : uprate(0), serverport(CUBE_DEFAULT_SERVER_PORT), syslogfacility(6), filethres(-1), syslogthres(-1), maxdemos(5),
|
||||
maxclients(DEFAULTCLIENTS), kickthreshold(-5), banthreshold(-6), verbose(0), incoming_limit(10),
|
||||
maxclients(DEFAULTCLIENTS), kickthreshold(-5), banthreshold(-6), verbose(0), incoming_limit(10), afk_limit(45),
|
||||
ip(""), master(NULL), logident(""), serverpassword(""), adminpasswd(""), demopath(""),
|
||||
maprot("config/maprot.cfg"), pwdfile("config/serverpwd.cfg"), blfile("config/serverblacklist.cfg"), nbfile("config/nicknameblacklist.cfg"),
|
||||
infopath("config/serverinfo"), motdpath("config/motd"), forbidden("config/forbidden.cfg"),
|
||||
@@ -843,7 +843,16 @@ struct servercommandline
|
||||
case 'A': if(*a) adminonlymaps.add(a); break;
|
||||
case 'a': if (ai >= 0) wait_afk = ai * 1000; break;
|
||||
case 'c': if(ai > 0) maxclients = min(ai, MAXCLIENTS); break;
|
||||
case 'k': if(ai < 0) kickthreshold = ai; break;
|
||||
case 'k':
|
||||
{
|
||||
if(arg[2]=='A' && arg[3]!='\0')
|
||||
{
|
||||
if ((ai = atoi(&arg[3])) >= 30) afk_limit = ai;
|
||||
else afk_limit = 0;
|
||||
}
|
||||
else if(ai < 0) kickthreshold = ai;
|
||||
break;
|
||||
}
|
||||
case 'y': if(ai < 0) banthreshold = ai; break;
|
||||
case 'x': adminpasswd = a; break;
|
||||
case 'p': serverpassword = a; break;
|
||||
|
||||
Reference in New Issue
Block a user