X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fhelperfuncs.cpp;h=31f486a48c753ac06739410dd90edc4caa4f75e4;hb=cc3503abc4e465c6d5c57a6e60716dafe0703aa5;hp=d46f53ec7fa7c1c3567e6e42fecc467ee74f909b;hpb=7d7250484c352c13830e63ae41ee8faae40a9bd5;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index d46f53ec7..31f486a48 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -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); +}