]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_hideoper.cpp
Include explicit routing information in Command, will replace CMD_LOCALONLY return...
[user/henk/code/inspircd.git] / src / modules / m_hideoper.cpp
index c08a428604347dc1fe8d47d35a31be167f5d00db..c204d51e9952a4d9db3d6c0efce821f57301e091 100644 (file)
@@ -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()