X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fm_rline.cpp;h=824d6229a9258df687e2685b260fe0fb082c64c9;hb=219993bc9018d9f0d9568330d7a972b68b785d27;hp=f6047704e7d429642f7576b476167685f69d91ec;hpb=43847ec9c7e1a195163eb4c529f1c92fd1ace0a4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp index f6047704e..824d6229a 100644 --- a/src/modules/m_rline.cpp +++ b/src/modules/m_rline.cpp @@ -3,7 +3,7 @@ * +------------------------------------+ * * InspIRCd: (C) 2002-2009 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see * the file COPYING for details. @@ -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); } @@ -73,7 +76,7 @@ class RLine : public XLine void DisplayExpiry() { - ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed R-Line %s (set by %s %ld seconds ago)", this->matchtext.c_str(), this->source, this->duration); + ServerInstance->SNO->WriteToSnoMask('x',"Removing expired R-Line %s (set by %s %ld seconds ago)", this->matchtext.c_str(), this->source, (long int)(ServerInstance->Time() - this->set_time)); } const char* Displayable() @@ -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);