]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nonicks.cpp
Fix infinite loop on alias expansion, found by Adam
[user/henk/code/inspircd.git] / src / modules / m_nonicks.cpp
index 22b0067cca0b7b5a4af022c3f825fe0b5742c973..368eaa34354d736dd4edc64a90189d5b00405352 100644 (file)
@@ -60,7 +60,7 @@ class ModuleNoNickChange : public Module
 
        virtual Version GetVersion()
        {
-               return Version("Provides support for channel mode +N & extban +b N: which prevents nick changes on channel", VF_COMMON | VF_VENDOR, API_VERSION);
+               return Version("Provides support for channel mode +N & extban +b N: which prevents nick changes on channel", VF_COMMON | VF_VENDOR);
        }
 
 
@@ -85,7 +85,10 @@ class ModuleNoNickChange : public Module
                {
                        Channel* curr = *i;
 
-                       if (CHANOPS_EXEMPT('N') && curr->GetPrefixValue(user) == OP_VALUE)
+                       ModResult res;
+                       FIRST_MOD_RESULT(OnChannelRestrictionApply, res, (user,curr,"nonick"));
+
+                       if (res == MOD_RES_ALLOW)
                                continue;
 
                        if (!curr->GetExtBanStatus(user, 'N').check(!curr->IsModeSet('N')))