]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_inviteexception.cpp
Send HALFOP= line in CAPAB CAPABILITIES for 1201 compat (anope relies on this)
[user/henk/code/inspircd.git] / src / modules / m_inviteexception.cpp
index b81a5237d52922ce02ef401bc4c4afa03e422af1..2e6f6db6533f98ea5cc7384ee73c5612f87e3448 100644 (file)
@@ -45,8 +45,8 @@ public:
                        throw ModuleException("Could not add new modes!");
 
                ie.DoImplements(this);
-               Implementation eventlist[] = { I_On005Numeric, I_OnCheckInvite };
-               ServerInstance->Modules->Attach(eventlist, this, 2);
+               Implementation eventlist[] = { I_On005Numeric, I_OnCheckInvite, I_OnCheckKey };
+               ServerInstance->Modules->Attach(eventlist, this, 3);
        }
 
        void On005Numeric(std::string &output)
@@ -74,6 +74,13 @@ public:
                return MOD_RES_PASSTHRU;
        }
 
+       ModResult OnCheckKey(User* user, Channel* chan, const std::string& key)
+       {
+               if (ServerInstance->Config->ConfValue("inviteexception")->getBool("bypasskey", true))
+                       return OnCheckInvite(user, chan);
+               return MOD_RES_PASSTHRU;
+       }
+
        void OnCleanup(int target_type, void* item)
        {
                ie.DoCleanup(target_type, item);
@@ -91,7 +98,7 @@ public:
 
        Version GetVersion()
        {
-               return Version("Provides support for the +I channel mode", VF_VENDOR | VF_COMMON);
+               return Version("Provides support for the +I channel mode", VF_VENDOR);
        }
 };