X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_allowinvite.cpp;h=08a5f542aeab68ac8e36e6b469cc615e015d1989;hb=b111d5098fe1ee306d2718c82c72f969db9d183d;hp=19a8640e794befcc46fa21ec463802958d798acf;hpb=553a8da754c8cd308bad2008018849714e70f9b7;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_allowinvite.cpp b/src/modules/m_allowinvite.cpp index 19a8640e7..08a5f542a 100644 --- a/src/modules/m_allowinvite.cpp +++ b/src/modules/m_allowinvite.cpp @@ -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 { @@ -34,10 +34,13 @@ class ModuleAllowInvite : public Module 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) @@ -72,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); } };