]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/config.cpp
Fixed the forest event from setting to 14 manually. (I was testing).
[irc/gameservirc.git] / gameserv / config.cpp
index 5fd1c4368a5b0c491b17e4f320c4d479db294287..92086a8812e5e3366c219f5187b8d5e2cb424955 100644 (file)
@@ -1,5 +1,6 @@
 #include <fstream.h>
 #include <string.h>
+#include <stdlib.h>
 #include <stdio.h>
 #include "extern.h"
 
@@ -18,6 +19,7 @@ char *adminpass;              // Administrator password
 char *welcomemsg;              // Welcome Message
 int welcomedelay;              // Welcome Message Delay
 int updateperiod;              // Seconds until another player database update
+int forestfights;              // Forest fights per day
 
 // Remote server stuff. This is used for the outgoing connection gameserv needs to make
 // to a real ircd.
@@ -82,6 +84,12 @@ void load_config_file(char *config)
        
        directive = strtok(buf, " ");
 
+        if (stricmp(directive, "DIE") == 0)
+       {
+           value = strtok(NULL, "");
+           cerr << value << endl;
+           exit(0);
+       }
        if (stricmp(directive, "S_GAMESERV") == 0)
        {
            value = strtok(NULL, " ");
@@ -159,6 +167,11 @@ void load_config_file(char *config)
            value = strtok(NULL, " ");
            welcomedelay = stringtoint(value);
        }
+       else if (stricmp(directive, "FORESTFIGHTS") == 0)
+       {
+           value = strtok(NULL, " ");
+           forestfights = stringtoint(value);
+       }
        else if (stricmp(directive, "UPDATEPERIOD") == 0)
        {
            value = strtok(NULL, " ");