X-Git-Url: https://jfr.im/git/irc/gameservirc.git/blobdiff_plain/e1c41a8400df5f83887f8274c84b7e576d2e41d3..33ac4371df8917180a54eb3f79dfc5c1e2744156:/gameserv/config.cpp diff --git a/gameserv/config.cpp b/gameserv/config.cpp index 97ae564..c43f014 100644 --- a/gameserv/config.cpp +++ b/gameserv/config.cpp @@ -5,6 +5,8 @@ #include "extern.h" using std::ifstream; +using std::cerr; +using std::endl; void load_config_file(char *config); void unload_config_file(); @@ -78,13 +80,14 @@ void load_config_file(char *config) if (infile.fail()) { log("Error opening %s", config); + cerr << "Error opening " << config << endl; return; } while (infile.getline(buf, 1024, '\n')) { #ifdef DEBUGMODE - log("Buf: %s", buf); + log("Config file entry buf: %s", buf); #endif if (buf[0] == '#' || buf[0] == ' ' || buf[0] == '\0' || buf[0] == '\n' || buf[0] == '\r') @@ -96,6 +99,8 @@ void load_config_file(char *config) { value = strtok(NULL, ""); log("You should read the entire %s file!", config); + cerr << "You should read the entire " << config << " file!" + << endl; exit(0); } if (stricmp(directive, "S_GAMESERV") == 0) @@ -195,6 +200,8 @@ void load_config_file(char *config) { #ifdef DEBUGMODE log("Unknown Directive. Buffer: %s", buf); + cerr << "Unknown " << config << " directive. Buffer: " + << buf << endl; #endif continue; }