X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_hideoper.cpp;h=c204d51e9952a4d9db3d6c0efce821f57301e091;hb=8085aa879bd989b526791797910295944a364084;hp=7a2448afc6caa70df3a70a4c62422f7980a3c92b;hpb=b5c1cf4e2cbb3b47134e26e63bbebc3f5d77e150;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp index 7a2448afc..c204d51e9 100644 --- a/src/modules/m_hideoper.cpp +++ b/src/modules/m_hideoper.cpp @@ -2,8 +2,8 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see * the file COPYING for details. @@ -47,15 +47,13 @@ class HideOper : public ModeHandler class ModuleHideOper : public Module { - - HideOper* hm; + HideOper hm; public: ModuleHideOper(InspIRCd* Me) - : Module(Me) + : Module(Me), hm(Me) { - hm = new HideOper(ServerInstance); - if (!ServerInstance->Modes->AddMode(hm)) + if (!ServerInstance->Modes->AddMode(&hm)) throw ModuleException("Could not add new modes!"); Implementation eventlist[] = { I_OnWhoisLine }; ServerInstance->Modules->Attach(eventlist, this, 1); @@ -64,8 +62,7 @@ class ModuleHideOper : public Module virtual ~ModuleHideOper() { - ServerInstance->Modes->DelMode(hm); - delete hm; + ServerInstance->Modes->DelMode(&hm); } virtual Version GetVersion() @@ -84,7 +81,7 @@ class ModuleHideOper : public Module if (!dest->IsModeSet('H')) return 0; - if (user->HasPrivPermission("users/auspex")) + if (!user->HasPrivPermission("users/auspex")) return 1; return 0;