X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fhelperfuncs.cpp;h=fba76805c0495b1ae9ef5f0463783318b6f69332;hb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;hp=42cb55cfd41a0934a14160ebce9a9f67bda6553a;hpb=66b90807bb94d88c8a34ec8a1fd7c1558941c47a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 42cb55cfd..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 @@ -423,7 +423,7 @@ void InspIRCd::SendWhoisLine(User* user, User* dest, int numeric, const char* fo /** Refactored by Brain, Jun 2009. Much faster with some clever O(1) array * lookups and pointer maths. */ -long InspIRCd::Duration(const std::string &str) +unsigned long InspIRCd::Duration(const std::string &str) { unsigned char multiplier = 0; long total = 0; @@ -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];