summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-08 22:36:15 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-08 22:36:15 +0000
commit66e76caaa09f5e7037590030ef14921359407a1a (patch)
treefed91abd555105c831900638fef117b6cd5f170a /src
parent32834b531c503bf86c022647b77c9eaad66eb36f (diff)
Don't check Q:Lines if server is enforcing a nick change (I forgot we had a way to check this). 'Bug' (it's not really a bug, just admin stupidity) found by Kein.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9434 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/commands/cmd_nick.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/commands/cmd_nick.cpp b/src/commands/cmd_nick.cpp
index dda168dfb..88265f2a4 100644
--- a/src/commands/cmd_nick.cpp
+++ b/src/commands/cmd_nick.cpp
@@ -60,12 +60,20 @@ 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
+ */
+ if (!allowinvalid)
{
- 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;
+ }
}
/*