]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_allowinvite.cpp
m_auditorium Handle NULL return from Channel::GetUser() in OnSendWhoLine()
[user/henk/code/inspircd.git] / src / modules / m_allowinvite.cpp
index 7dd2efc242199a25c1989820ce3a2754f333fa7d..08a5f542aeab68ac8e36e6b469cc615e015d1989 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides support for channel mode +A, allowing /invite freely on a channel (and extban A to allow specific users it) */
+/* $ModDesc: Provides support for channel mode +A, allowing /invite freely on a channel and extban A to deny specific users it */
 
 class AllowInvite : public SimpleChannelModeHandler
 {
@@ -38,10 +38,9 @@ class ModuleAllowInvite : public Module
 
        void init()
        {
-               if (!ServerInstance->Modes->AddMode(&ni))
-                       throw ModuleException("Could not add new modes!");
+               ServerInstance->Modules->AddService(ni);
                Implementation eventlist[] = { I_OnUserPreInvite, I_On005Numeric };
-               ServerInstance->Modules->Attach(eventlist, this, 2);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        virtual void On005Numeric(std::string &output)
@@ -76,7 +75,7 @@ class ModuleAllowInvite : public Module
 
        virtual Version GetVersion()
        {
-               return Version("Provides support for channel mode +A, allowing /invite freely on a channel (and extban A to allow specific users it)",VF_VENDOR);
+               return Version("Provides support for channel mode +A, allowing /invite freely on a channel and extban A to deny specific users it",VF_VENDOR);
        }
 };