char *c_Forest; // Forest channel
char *c_ForestTopic; // Forest Channel Topic
char *adminpass; // Administrator password
-
+char *welcomemsg; // Welcome Message
+int confloadtime; // Welcome Message Delay
// Remote server stuff. This is used for the outgoing connection gameserv needs to make
// to a real ircd.
char *remotepass; // Password for the server link
char *playerdata; // File to store player data in
+char *monsterdata; // File to load monster data from
void unload_config_file()
{
delete [] remotepass;
if (playerdata)
delete [] playerdata;
+ if (monsterdata)
+ delete [] monsterdata;
if (adminpass)
delete [] adminpass;
+ if (welcomemsg)
+ delete [] welcomemsg;
}
+
void load_config_file(char *config)
{
char *buf, *directive, *value;
playerdata = new char[strlen(value) + 1];
strcpy(playerdata, value);
}
+ else if (stricmp(directive, "MONSTERDATA") == 0)
+ {
+ value = strtok(NULL, "");
+ monsterdata = new char[strlen(value) + 1];
+ strcpy(monsterdata, value);
+ }
else if (stricmp(directive, "ADMINPASS") == 0)
{
value = strtok(NULL, "");
adminpass = new char[strlen(value) + 1];
strcpy(adminpass, value);
}
+ else if (stricmp(directive, "CONFLOADTIME") == 0)
+ {
+ value = strtok(NULL, " ");
+ confloadtime = stringtoint(value);
+ }
+ else if (stricmp(directive, "WELCOMEMSG") == 0)
+ {
+ value = strtok(NULL, "");
+ welcomemsg = new char[strlen(value) + 1];
+ strcpy(welcomemsg, value);
+ }
else
{
cout << "Unknown Directive. Buffer: " << buf << endl;