summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-16 09:50:23 +0000
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-16 09:50:23 +0000
commit14e4768140d796b3cb9eb979e74e48bffabd9bfc (patch)
treee57758a708015353bed13a70e25c1d7777cf977b /src/helperfuncs.cpp
parent403d16068410909b8d352588dc83f6d255a018b7 (diff)
Applied patch by psychon to make AddExtBanChar correctly take a single char
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10024 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index d2c4c7c3e..7b23025e0 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -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.push_back(c);
}
else
- tok.insert(tok.find(" EXTBAN=:") + 9, c);
+ tok.insert(ebpos + 9, 1, c);
}