]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_nick.cpp
Remove use of SendSNONotice to send to remote servers, this is done automagically now
[user/henk/code/inspircd.git] / src / commands / cmd_nick.cpp
index dda168dfb22d5f804e3b3605688c5ef9e8523036..059a978060e06f9cc7f6deb61626637e5cd69db8 100644 (file)
@@ -60,12 +60,23 @@ CmdResult CommandNick::Handle (const char* const* parameters, int, User *user)
        }
        else
        {
-               XLine* mq = ServerInstance->XLines->MatchesLine("Q",parameters[0]);
-               if (mq)
+               /*
+                * Don't check Q:Lines if it's a server-enforced change, just on the off-chance some fucking *moron*
+                * tries to Q:Line SIDs, also, this means we just get our way period, as it really should be.
+                * Thanks Kein for finding this. -- w00t
+                *
+                * Also don't check Q:Lines for remote nickchanges, they should have our Q:Lines anyway to enforce themselves.
+                *              -- w00t
+                */
+               if (!allowinvalid || !IS_LOCAL(user))
                {
-                       ServerInstance->SNO->WriteToSnoMask('x', "Q-Lined nickname %s from %s!%s@%s: %s", parameters[0], user->nick, user->ident, user->host, mq->reason);
-                       user->WriteNumeric(432, "%s %s :Invalid nickname: %s",user->nick,parameters[0], mq->reason);
-                       return CMD_FAILURE;
+                       XLine* mq = ServerInstance->XLines->MatchesLine("Q",parameters[0]);
+                       if (mq)
+                       {
+                               ServerInstance->SNO->WriteToSnoMask('x', "Q-Lined nickname %s from %s!%s@%s: %s", parameters[0], user->nick, user->ident, user->host, mq->reason);
+                               user->WriteNumeric(432, "%s %s :Invalid nickname: %s",user->nick,parameters[0], mq->reason);
+                               return CMD_FAILURE;
+                       }
                }
 
                /*