Merge pull request #1445 from B00mX0r/master+nickmsg

Clarify error message when attempting to /NICK while banned
This commit is contained in:
Peter Powell 2017-12-20 10:44:04 +00:00 committed by GitHub
commit 51d9f02be9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -77,7 +77,8 @@ CmdResult CommandNick::HandleLocal(const std::vector<std::string>& parameters, L
Channel* chan = (*i)->chan;
if (chan->GetPrefixValue(user) < VOICE_VALUE && chan->IsBanned(user))
{
user->WriteNumeric(ERR_CANNOTSENDTOCHAN, chan->name, "Cannot send to channel (you're banned)");
user->WriteNumeric(ERR_CANTCHANGENICK, InspIRCd::Format("Cannot change nickname while on %s (you're banned)",
chan->name.c_str()));
return CMD_FAILURE;
}
}

View File

@ -60,7 +60,7 @@ class ModuleNoNickChange : public Module
if (!curr->GetExtBanStatus(user, 'N').check(!curr->IsModeSet(nn)))
{
user->WriteNumeric(ERR_CANTCHANGENICK, InspIRCd::Format("Can't change nickname while on %s (+N is set)",
user->WriteNumeric(ERR_CANTCHANGENICK, InspIRCd::Format("Cannot change nickname while on %s (+N is set)",
curr->name.c_str()));
return MOD_RES_DENY;
}