]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/helperfuncs.cpp
detect if the process has an interactive session (if its started as a service, the...
[user/henk/code/inspircd.git] / src / helperfuncs.cpp
index d2c4c7c3ecd32760b847bba117f06047f0452676..31f486a48c753ac06739410dd90edc4caa4f75e4 100644 (file)
@@ -11,7 +11,7 @@
  * ---------------------------------------------------
  */
 
-/* $Core: libIRCDhelper */
+/* $Core */
 
 #include "inspircd.h"
 #include "wildcard.h"
@@ -470,15 +470,16 @@ std::string InspIRCd::TimeString(time_t curtime)
 }
 
 // You should only pass a single character to this.
-void InspIRCd::AddExtBanChar(const char *c)
+void InspIRCd::AddExtBanChar(char c)
 {
        std::string &tok = Config->data005;
+       std::string::size_type ebpos;
        
-       if (tok.find(" EXTBAN=:") == std::string::npos)
+       if ((ebpos = tok.find(" EXTBAN=,")) == std::string::npos)
        {
-               tok.append(" EXTBAN=:");
-               tok.append(c);
+               tok.append(" EXTBAN=,");
+               tok.push_back(c);
        }
        else
-               tok.insert(tok.find(" EXTBAN=:") + 9, c);
+               tok.insert(ebpos + 9, 1, c);
 }