]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nonicks.cpp
m_spanningtree Remove SpanningTreeUtilities* fields and parameters
[user/henk/code/inspircd.git] / src / modules / m_nonicks.cpp
index 8981097beacd3747033ac5c3026c2e15bbf98c19..4078e54a4fecbaff9722f311648c17de109c4c65 100644 (file)
@@ -21,8 +21,6 @@
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides support for channel mode +N & extban +b N: which prevents nick changes on channel */
-
 class NoNicks : public SimpleChannelModeHandler
 {
  public:
@@ -42,8 +40,6 @@ class ModuleNoNickChange : public Module
        {
                OnRehash(NULL);
                ServerInstance->Modules->AddService(nn);
-               Implementation eventlist[] = { I_OnUserPreNick, I_On005Numeric, I_OnRehash };
-               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        Version GetVersion() CXX11_OVERRIDE
@@ -73,7 +69,7 @@ class ModuleNoNickChange : public Module
                        if (override && user->IsOper())
                                continue;
 
-                       if (!curr->GetExtBanStatus(user, 'N').check(!curr->IsModeSet('N')))
+                       if (!curr->GetExtBanStatus(user, 'N').check(!curr->IsModeSet(nn)))
                        {
                                user->WriteNumeric(ERR_CANTCHANGENICK, "%s :Can't change nickname while on %s (+N is set)",
                                        user->nick.c_str(), curr->name.c_str());