]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nonicks.cpp
Remove unneeded headers from spanningtree. This was done to the rest of the source...
[user/henk/code/inspircd.git] / src / modules / m_nonicks.cpp
index 7f40c4ac9c9ccd1cfcdb170cda8faaa5b0d63072..3adc9e160f2630ca5232bdfc758813daa6d93822 100644 (file)
  */
 
 #include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
-#include "hashcomp.h"
-#include "configreader.h"
 
 /* $ModDesc: Provides support for channel mode +N which prevents nick changes on channel */
 
@@ -80,6 +75,9 @@ class ModuleNoNickChange : public Module
        {
                if (IS_LOCAL(user))
                {
+                       if (isdigit(newnick[0])) /* don't even think about touching a switch to uid! */
+                               return 0;
+
                        for (UCListIter i = user->chans.begin(); i != user->chans.end(); i++)
                        {
                                chanrec* curr = i->first;
@@ -99,4 +97,4 @@ class ModuleNoNickChange : public Module
        }
 };
 
-MODULE_INIT(ModuleNoNickChange);
+MODULE_INIT(ModuleNoNickChange)