]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chanprotect.cpp
Run DelMode and DelModeWatcher in RemoveModule
[user/henk/code/inspircd.git] / src / modules / m_chanprotect.cpp
index 4d046b41597f537acae63d39849d6062b6c1eae8..ef6c129e11358ea9356f4eeaf8875f455a7aadac 100644 (file)
@@ -67,7 +67,7 @@ class FounderProtectBase
                const UserMembList* cl = channel->GetUsers();
                std::vector<std::string> mode_junk;
                mode_junk.push_back(channel->name);
-               irc::modestacker modestack(ServerInstance, false);
+               irc::modestacker modestack(false);
                std::deque<std::string> stackresult;
 
                for (UserMembCIter i = cl->begin(); i != cl->end(); i++)
@@ -266,8 +266,8 @@ class ModuleChanProtect : public Module
 
  public:
 
-       ModuleChanProtect(InspIRCd* Me)
-               : Module(Me), FirstInGetsFounder(false), QPrefix(0), APrefix(0), DeprivSelf(false), DeprivOthers(false), booting(true), cp(NULL), cf(NULL)
+       ModuleChanProtect()
+               : FirstInGetsFounder(false), QPrefix(0), APrefix(0), DeprivSelf(false), DeprivOthers(false), booting(true), cp(NULL), cf(NULL)
        {
                /* Load config stuff */
                LoadSettings();
@@ -291,7 +291,7 @@ class ModuleChanProtect : public Module
 
        void LoadSettings()
        {
-               ConfigReader Conf(ServerInstance);
+               ConfigReader Conf;
 
                FirstInGetsFounder = Conf.ReadFlag("chanprotect", "noservices", 0);
 
@@ -327,8 +327,6 @@ class ModuleChanProtect : public Module
 
        ~ModuleChanProtect()
        {
-               ServerInstance->Modes->DelMode(cp);
-               ServerInstance->Modes->DelMode(cf);
                delete cp;
                delete cf;
        }