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
This commit is contained in:
w00t 2008-04-08 22:36:15 +00:00
parent 32834b531c
commit 66e76caaa0

View File

@ -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;
}
}
/*