]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/helperfuncs.cpp
m_spanningtree Remove unneeded #includes
[user/henk/code/inspircd.git] / src / helperfuncs.cpp
index 42cb55cfd41a0934a14160ebce9a9f67bda6553a..fba76805c0495b1ae9ef5f0463783318b6f69332 100644 (file)
@@ -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];