]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/config.cpp
Added a lot of functionality. Added player flags and save/load them in the players...
[irc/gameservirc.git] / gameserv / config.cpp
index fcc004c00e935be55b95951f1eb6f764e8b8408b..8e3b35998c0de61f4a10a5abcaa452a034ee8d25 100644 (file)
@@ -5,8 +5,6 @@
 
 void load_config_file(char *config);
 void unload_config_file();
-int stricmp(const char *s1, const char *s2);
-int strnicmp(const char *s1, const char *s2, size_t len);
 
 /* Random Configuration Stuff Goes Here until I code it to load from a .conf file :)*/
 
@@ -63,7 +61,7 @@ void load_config_file(char *config)
     infile.open(config);
     if (infile.fail())
     {
-       cerr << "Error opening " << config << endl;
+       cout << "Error opening " << config << endl;
        return;
     }
 
@@ -71,7 +69,7 @@ void load_config_file(char *config)
     {
        cout << "Buf: " << buf << endl;
 
-       if (buf[0] == '#' || buf[0] == ' ' || buf[0] == '\0')
+       if (buf[0] == '#' || buf[0] == ' ' || buf[0] == '\0' || buf[0] == '\n' || buf[0] == '\r')
            continue;
        
        directive = strtok(buf, " ");
@@ -144,10 +142,9 @@ void load_config_file(char *config)
        }
        else
        {
-           cerr << "Unknown Directive. Buffer: " << buf << endl;
+           cout << "Unknown Directive. Buffer: " << buf << endl;
            continue;
        }
-       //infile.ignore(1);
     }
 delete [] buf;
 infile.close();