]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/config.cpp
Did some TODO things... command line parameters (config file), etc
[irc/gameservirc.git] / gameserv / config.cpp
index c43f01411faa2b0d1817067063a5c1cd03d54f84..4481832e3b33bd510cf7906fcd6e7d525a83813b 100644 (file)
@@ -8,7 +8,7 @@ using std::ifstream;
 using std::cerr;
 using std::endl;
 
-void load_config_file(char *config);
+int load_config_file(char *config);
 void unload_config_file();
 
 /* Random Configuration Stuff Goes Here until I code it to load from a .conf file :)*/
@@ -68,7 +68,7 @@ void unload_config_file()
        delete [] welcomemsg;
 }
 
-void load_config_file(char *config)
+int load_config_file(char *config)
 {
     char *buf, *directive, *value;
     buf = new char[1024];
@@ -81,7 +81,7 @@ void load_config_file(char *config)
     {
        log("Error opening %s", config);
        cerr << "Error opening " << config << endl;
-       return;
+       return 0;
     }
 
     while (infile.getline(buf, 1024, '\n'))
@@ -208,4 +208,5 @@ void load_config_file(char *config)
     }
 delete [] buf;
 infile.close();
+return 1;
 }