X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_rline.cpp;h=824d6229a9258df687e2685b260fe0fb082c64c9;hb=8085aa879bd989b526791797910295944a364084;hp=3895705e028410d31eb9440aec38650b4c3cfdb4;hpb=b6dbd6caab62bc2c0d11ce5a45d511611eb9c2ef;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp index 3895705e0..824d6229a 100644 --- a/src/modules/m_rline.cpp +++ b/src/modules/m_rline.cpp @@ -57,6 +57,9 @@ class RLine : public XLine bool Matches(User *u) { + if (u->exempt) + return false; + std::string compare = u->nick + "!" + u->ident + "@" + u->host + " " + u->fullname; return regex->Matches(compare); } @@ -183,25 +186,21 @@ class CommandRLine : public Command class ModuleRLine : public Module { private: - CommandRLine *r; - RLineFactory *f; + CommandRLine r; + RLineFactory f; bool MatchOnNickChange; std::string RegexEngine; public: - ModuleRLine(InspIRCd* Me) : Module(Me) + ModuleRLine(InspIRCd* Me) : Module(Me), r(Me), f(Me) { mymodule = this; - OnRehash(NULL, ""); + OnRehash(NULL); Me->Modules->UseInterface("RegularExpression"); - // Create a new command - r = new CommandRLine(ServerInstance); - ServerInstance->AddCommand(r); - - f = new RLineFactory(ServerInstance); - ServerInstance->XLines->RegisterFactory(f); + ServerInstance->AddCommand(&r); + ServerInstance->XLines->RegisterFactory(&f); Implementation eventlist[] = { I_OnUserConnect, I_OnRehash, I_OnUserPostNick, I_OnLoadModule, I_OnStats }; ServerInstance->Modules->Attach(eventlist, this, 5); @@ -212,7 +211,7 @@ class ModuleRLine : public Module { ServerInstance->Modules->DoneWithInterface("RegularExpression"); ServerInstance->XLines->DelAll("R"); - ServerInstance->XLines->UnregisterFactory(f); + ServerInstance->XLines->UnregisterFactory(&f); } virtual Version GetVersion() @@ -232,7 +231,7 @@ class ModuleRLine : public Module } } - virtual void OnRehash(User *user, const std::string ¶meter) + virtual void OnRehash(User *user) { ConfigReader Conf(ServerInstance);