#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
{
ModuleAllowInvite() : ni(this)
{
- if (!ServerInstance->Modes->AddMode(&ni))
- throw ModuleException("Could not add new modes!");
+ }
+
+ void init()
+ {
+ 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)
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);
}
};