]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_services.cpp
No idea why this wasn't using MODULE_INIT. Thanks Om.
[user/henk/code/inspircd.git] / src / modules / m_services.cpp
index 22b5dfcb5fdb27ca7cbebdfd182a0df39f42ba32..7cf894fbc8d48d065bd3693a13fb6f62399c6147 100644 (file)
@@ -12,9 +12,6 @@
  */
 
 #include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
 
 static bool kludgeme = false;
 
@@ -209,7 +206,7 @@ class ModuleServices : public Module
        virtual void OnUserPostNick(userrec* user, const std::string &oldnick)
        {
                /* On nickchange, if they have +r, remove it */
-               if (user->IsModeSet('r'))
+               if (user->IsModeSet('r') && irc::string(user->nick) != oldnick)
                {
                        const char* modechange[2];
                        modechange[0] = user->nick;