]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_commonchans.cpp
Update wiki links to use HTTPS and point to the correct pages.
[user/henk/code/inspircd.git] / src / modules / m_commonchans.cpp
index 877ba87d7fcb297dc2eff272cb4a04d369a14371..afa17add4512d437f41d58ecdad182d40c9b52ad 100644 (file)
@@ -35,12 +35,14 @@ class ModulePrivacyMode : public Module
  public:
        ModulePrivacyMode() : pm(this)
        {
-               if (!ServerInstance->Modes->AddMode(&pm))
-                       throw ModuleException("Could not add new modes!");
-               Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice };
-               ServerInstance->Modules->Attach(eventlist, this, 2);
        }
 
+       void init()
+       {
+               ServerInstance->Modules->AddService(pm);
+               Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice };
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
+       }
 
        virtual ~ModulePrivacyMode()
        {