int welcomedelay; // Welcome Message Delay
int updateperiod; // Seconds until another player database update
int forestfights; // Forest fights per day
+int maxafightdistance; // Max levels above a player they can fight player->player
+int maxbfightdistance; // Max levels below a player they can fight player->player
// Remote server stuff. This is used for the outgoing connection gameserv needs to make
// to a real ircd.
char *playerdata; // File to store player data in
char *monsterdata; // File to load monster data from
+char *pidfile; // Process ID file
#if defined(P10)
char *gsnum = "[]AAA"; // GameServ Numeric
delete [] adminpass;
if (welcomemsg)
delete [] welcomemsg;
+ if (pidfile)
+ delete [] pidfile;
}
int load_config_file(char *config)
{
char *buf, *directive, *value;
- #define numdirectives 15
+
+ #define numdirectives 19
unload_config_file();
directives[13].desc = "FORESTFIGHTS - Number of forest fights players get every day";
directives[14].desc = "UPDATEPERIOD - Number of seconds between every player data save";
directives[15].desc = "WELCOMEMSG - Message to send to new users on the network";
+ directives[16].desc = "PIDFILE - Filename to store the gameserv process ID in";
+ directives[17].desc = "MAXAFIGHTDISTANCE - The maximum number of levels above you "\
+ "that you can fight player->player";
+ directives[18].desc = "MAXBFIGHTDISTANCE - The maximum number of levels below you "\
+ "that you can fight player->player";
for (int count = 0; count < numdirectives; count++)
{
strcpy(welcomemsg, value);
directives[15].done = true;
}
+ else if (stricmp(directive, "PIDFILE") == 0)
+ {
+ value = strtok(NULL, " ");
+ pidfile = new char[strlen(value) + 1];
+ strcpy(pidfile, value);
+ directives[16].done = true;
+ }
+ else if (stricmp(directive, "MAXAFIGHTDISTANCE") == 0)
+ {
+ value = strtok(NULL, " ");
+ maxafightdistance = stringtoint(value);
+ directives[17].done = true;;
+ }
+ else if (stricmp(directive, "MAXBFIGHTDISTANCE") == 0)
+ {
+ value = strtok(NULL, " ");
+ maxbfightdistance = stringtoint(value);
+ directives[18].done = true;
+ }
else
{
#ifdef DEBUGMODE