X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_helpop.cpp;h=3a5934a6781c6bf8773381ee3124399af774a64f;hb=94afde43b086f092bf8128d76d418cb63840e8eb;hp=1ca9e0b5e7d7304db82a011cdf07980a559457b5;hpb=b669f920eaa9fb795d0a103d724943898a0df4b2;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index 1ca9e0b5e..3a5934a67 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * InspIRCd: (C) 2002-2008 InspIRCd Development Team * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see @@ -115,10 +115,12 @@ class ModuleHelpop : public Module { ReadConfig(); ho = new Helpop(ServerInstance); - if (!ServerInstance->AddMode(ho, 'h')) + if (!ServerInstance->AddMode(ho)) throw ModuleException("Could not add new modes!"); mycommand = new CommandHelpop(ServerInstance); ServerInstance->AddCommand(mycommand); + Implementation eventlist[] = { I_OnRehash, I_OnWhois }; + ServerInstance->Modules->Attach(eventlist, this, 2); } virtual void ReadConfig() @@ -153,10 +155,6 @@ class ModuleHelpop : public Module } - void Implements(char* List) - { - List[I_OnRehash] = List[I_OnWhois] = 1; - } virtual void OnRehash(User* user, const std::string ¶meter) { @@ -174,7 +172,7 @@ class ModuleHelpop : public Module virtual ~ModuleHelpop() { ServerInstance->Modes->DelMode(ho); - DELETE(ho); + delete ho; } virtual Version GetVersion()