]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/helperfuncs.cpp
match() is no longer a function+no header, now a static method of InspIRCd class...
[user/henk/code/inspircd.git] / src / helperfuncs.cpp
index d2c4c7c3ecd32760b847bba117f06047f0452676..53529f5395b8e35117bbf444da46631dc9972434 100644 (file)
  * ---------------------------------------------------
  */
 
-/* $Core: libIRCDhelper */
+/* $Core */
 
 #include "inspircd.h"
-#include "wildcard.h"
 #include "xline.h"
 #include "exitcodes.h"
 
@@ -470,15 +469,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);
 }