summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
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);
}