summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-14 11:53:07 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-14 11:53:07 +0000
commitac71a039c396c323ec5e32e389f0a165a0e21473 (patch)
treeecda6be6a5f8fb8844ae2fe846236649e4c3940b /src/helperfuncs.cpp
parent9ab90c52b46cc613d29174fd183330bd9ace1e97 (diff)
Add InspIRCd::AddExtBanChar() to avoid copypasta.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10017 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index d46f53ec7..d2c4c7c3e 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -469,3 +469,16 @@ 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(const char *c)
+{
+ std::string &tok = Config->data005;
+
+ if (tok.find(" EXTBAN=:") == std::string::npos)
+ {
+ tok.append(" EXTBAN=:");
+ tok.append(c);
+ }
+ else
+ tok.insert(tok.find(" EXTBAN=:") + 9, c);
+}