X-Git-Url: https://jfr.im/git/irc/gameservirc.git/blobdiff_plain/45a84400eb576fa7fefde850d1a7ddc4e5ada35b..1af35752f2d368fd53598eb57dc837076e862b15:/gameserv/config.cpp diff --git a/gameserv/config.cpp b/gameserv/config.cpp index fcc004c..8e3b359 100644 --- a/gameserv/config.cpp +++ b/gameserv/config.cpp @@ -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();