]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/helperfuncs.cpp
Initial commit of m_satopic, provides /satopic. Needs testing on a multi-server network.
[user/henk/code/inspircd.git] / src / helperfuncs.cpp
index d46f53ec7fa7c1c3567e6e42fecc467ee74f909b..4a9ca7f19bc7cd24d81c1dcc83553a0e32eadce7 100644 (file)
@@ -11,7 +11,7 @@
  * ---------------------------------------------------
  */
 
-/* $Core: libIRCDhelper */
+/* $Core */
 
 #include "inspircd.h"
 #include "wildcard.h"
@@ -469,3 +469,17 @@ 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;
+       
+       if ((ebpos = tok.find(" EXTBAN=:")) == std::string::npos)
+       {
+               tok.append(" EXTBAN=:");
+               tok.push_back(c);
+       }
+       else
+               tok.insert(ebpos + 9, 1, c);
+}