X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_rline.cpp;h=7a65947d3b4dc046520695f3f895bdd6cca57e91;hb=e950f568d0f571e9475aa38177486468714de4d3;hp=161cd4d0fa599cb6c1b1c30f03f52b4a6fe275c5;hpb=4ab1c43c1eee708fc50a4808f714a731891b75e8;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp index 161cd4d0f..7a65947d3 100644 --- a/src/modules/m_rline.cpp +++ b/src/modules/m_rline.cpp @@ -20,8 +20,6 @@ */ -/* $ModDesc: RLINE: Regexp user banning. */ - #include "inspircd.h" #include "modules/regex.h" #include "xline.h" @@ -41,11 +39,10 @@ class RLine : public XLine * @param regex Pattern to match with * @ */ - RLine(time_t s_time, long d, std::string src, std::string re, std::string regexs, dynamic_reference& rxfactory) + RLine(time_t s_time, long d, const std::string& src, const std::string& re, const std::string& regexs, dynamic_reference& rxfactory) : XLine(s_time, d, src, re, "R") + , matchtext(regexs) { - matchtext = regexs; - /* This can throw on failure, but if it does we DONT catch it here, we catch it and display it * where the object is created, we might not ALWAYS want it to output stuff to snomask x all the time */ @@ -92,9 +89,9 @@ class RLine : public XLine DefaultApply(u, "R", false); } - const char* Displayable() + const std::string& Displayable() { - return matchtext.c_str(); + return matchtext; } std::string matchtext; @@ -230,9 +227,6 @@ class ModuleRLine : public Module ServerInstance->Modules->AddService(r); ServerInstance->XLines->RegisterFactory(&f); - - Implementation eventlist[] = { I_OnUserRegister, I_OnRehash, I_OnUserPostNick, I_OnStats, I_OnBackgroundTimer, I_OnUnloadModule }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } ~ModuleRLine()