]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nicklock.cpp
Add initial query support to m_mysql [patch by Athenon]
[user/henk/code/inspircd.git] / src / modules / m_nicklock.cpp
index bc5ebe47a781e0938eff921f1f972667d02950dd..e7c9e01994cd85d2d2a8c4f38f2ecba406c26cd6 100644 (file)
@@ -168,23 +168,23 @@ class ModuleNickLock : public Module
        }
 
 
-       virtual int OnUserPreNick(User* user, const std::string &newnick)
+       virtual ModResult OnUserPreNick(User* user, const std::string &newnick)
        {
                if (!IS_LOCAL(user))
-                       return 0;
+                       return MOD_RES_PASSTHRU;
 
                if (isdigit(newnick[0])) /* Allow a switch to a UID */
-                       return 0;
+                       return MOD_RES_PASSTHRU;
 
                if (user->GetExt("NICKForced")) /* Allow forced nick changes */
-                       return 0;
+                       return MOD_RES_PASSTHRU;
 
                if (user->GetExt("nick_locked"))
                {
                        user->WriteNumeric(447, "%s :You cannot change your nickname (your nick is locked)",user->nick.c_str());
-                       return 1;
+                       return MOD_RES_DENY;
                }
-               return 0;
+               return MOD_RES_PASSTHRU;
        }
 
        virtual void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)