X-Git-Url: https://jfr.im/git/irc/gameservirc.git/blobdiff_plain/4bcfa8639332e9d6ce7fe34c70385575a5bd90a3..729503eae9b4d250558617dd3277989d2c6142f2:/gameserv/config.cpp diff --git a/gameserv/config.cpp b/gameserv/config.cpp index 7672c76..cc04311 100644 --- a/gameserv/config.cpp +++ b/gameserv/config.cpp @@ -30,6 +30,8 @@ int maxafightdistance; // Max levels above a player they can fight player->play int maxbfightdistance; // Max levels below a player they can fight player->player int maxidletime; // Max time (in seconds) a player can be idle for int idlecheckperiod; // Period for checking every player's idle time +int level1expire; // Days for level 1 players to expire +int defaultexpire; // Days for other levels to expire long refreshperiod; // Period for refreshing players long configflags; // Holds the bit representation of some boolean values @@ -90,7 +92,7 @@ int load_config_file(char *config) { char *buf, *directive, *value; - #define numdirectives 23 + #define numdirectives 25 unload_config_file(); @@ -132,6 +134,12 @@ int load_config_file(char *config) directives[21].desc = "NEWSDATA - File to store daily news in"; directives[22].desc = "REFRESHPERIOD - Period (in seconds) to "\ "refresh players"; + directives[23].desc = "LEVEL1EXPIRE - Amount of days until a "\ + "level 1 player's account is deleted due to "\ + "inactivity."; + directives[24].desc = "DEFAULTEXPIRE - Amount of days until a "\ + "level 2 and above player's account is "\ + "deleted due to inactivity"; configflags = 0; @@ -325,6 +333,18 @@ int load_config_file(char *config) refreshperiod = stringtoint(value); directives[22].done = true; } + else if (stricmp(directive, "LEVEL1EXPIRE") == 0) + { + value = strtok(NULL, " "); + level1expire = stringtoint(value); + directives[23].done = true; + } + else if (stricmp(directive, "DEFAULTEXPIRE") == 0) + { + value = strtok(NULL, " "); + defaultexpire = stringtoint(value); + directives[24].done = true; + } else if (stricmp(directive, "WELCOMEMSG") == 0) { // This directive is optional