X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fhelperfuncs.cpp;h=fba76805c0495b1ae9ef5f0463783318b6f69332;hb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;hp=a673c1b14cbeafe01e4502734f833b0ebb1d7e1c;hpb=886f1ba488a5ab9d7fe4d7b4ac6b9c9dc2841738;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index a673c1b14..fba76805c 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -379,7 +379,7 @@ bool InspIRCd::OpenLog(char**, int) } FileWriter* fw = new FileWriter(startup); - FileLogStream *f = new FileLogStream((Config->cmdline.forcedebug ? DEBUG : DEFAULT), fw); + FileLogStream *f = new FileLogStream((Config->cmdline.forcedebug ? LOG_DEBUG : LOG_DEFAULT), fw); this->Logs->AddLogType("*", f, true); @@ -392,7 +392,7 @@ void InspIRCd::CheckRoot() if (geteuid() == 0) { std::cout << "ERROR: You are running an irc server as root! DO NOT DO THIS!" << std::endl << std::endl; - this->Logs->Log("STARTUP",DEFAULT,"Can't start as root"); + this->Logs->Log("STARTUP",LOG_DEFAULT,"Can't start as root"); Exit(EXIT_STATUS_ROOT); } #endif @@ -485,26 +485,6 @@ std::string InspIRCd::TimeString(time_t curtime) return std::string(ctime(&curtime),24); } -// You should only pass a single character to this. -void InspIRCd::AddExtBanChar(char c) -{ - std::string &tok = Config->data005; - std::string::size_type ebpos = tok.find(" EXTBAN=,"); - - if (ebpos == std::string::npos) - { - tok.append(" EXTBAN=,"); - tok.push_back(c); - } - else - { - ebpos += 9; - while (isalpha(tok[ebpos]) && tok[ebpos] < c) - ebpos++; - tok.insert(ebpos, 1, c); - } -} - std::string InspIRCd::GenRandomStr(int length, bool printable) { char* buf = new char[length];