]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chanprotect.cpp
Write out the permchannels database on a timer, not on every mode change
[user/henk/code/inspircd.git] / src / modules / m_chanprotect.cpp
index 77fe3f353b66df0eb4bb257083b9012a0319e6a8..62e41416bac806ca5caae0ab4604a124009d83cd 100644 (file)
@@ -230,15 +230,17 @@ class ModuleChanProtect : public Module
        ChanFounder cf;
  public:
        ModuleChanProtect() : cp(this), cf(this)
+       {
+       }
+
+       void init()
        {
                /* Load config stuff */
                LoadSettings();
                settings.booting = false;
 
-               if (!ServerInstance->Modes->AddMode(&cp) || !ServerInstance->Modes->AddMode(&cf))
-               {
-                       throw ModuleException("Could not add new modes!");
-               }
+               ServerInstance->Modules->AddService(cf);
+               ServerInstance->Modules->AddService(cp);
 
                Implementation eventlist[] = { I_OnUserPreJoin };
                ServerInstance->Modules->Attach(eventlist, this, 1);
@@ -287,7 +289,7 @@ class ModuleChanProtect : public Module
 
        Version GetVersion()
        {
-               return Version("Founder and Protect modes (+qa)", VF_COMMON | VF_VENDOR);
+               return Version("Founder and Protect modes (+qa)", VF_VENDOR);
        }
 };