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].c_str(), user->nick.c_str(), user->ident.c_str(), user->host.c_str(), mq->reason);
+ if (user->registered == REG_ALL)
+ {
+ ServerInstance->SNO->WriteToSnoMask('x', "Q-Lined nickname %s from %s!%s@%s: %s", parameters[0].c_str(), user->nick.c_str(), user->ident.c_str(), user->host.c_str(), mq->reason);
+ }
user->WriteNumeric(432, "%s %s :Invalid nickname: %s",user->nick.c_str(), parameters[0].c_str(), mq->reason);
return CMD_FAILURE;
}
{
user->registered = (user->registered | REG_NICK);
}
+
+ // Keep these seperate!
+
if (user->registered == REG_NICKUSER)
{
/* user is registered now, bit 0 = USER command, bit 1 = sent a NICK command */
if (MOD_RESULT > 0)
return CMD_FAILURE;
}
- if (user->registered == REG_ALL)
+ else if (user->registered == REG_ALL)
{
user->IncreasePenalty(10);
FOREACH_MOD(I_OnUserPostNick,OnUserPostNick(user, oldnick));