From bb7b2fc9e76f7a0894afd9bb88c9c326cf20fe6f Mon Sep 17 00:00:00 2001 From: B00mX0r Date: Tue, 19 Dec 2017 13:50:20 -0800 Subject: Clarify error message when attempting to /NICK while banned --- src/coremods/core_user/cmd_nick.cpp | 3 ++- src/modules/m_nonicks.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/coremods/core_user/cmd_nick.cpp b/src/coremods/core_user/cmd_nick.cpp index cedafbbf4..672155741 100644 --- a/src/coremods/core_user/cmd_nick.cpp +++ b/src/coremods/core_user/cmd_nick.cpp @@ -77,7 +77,8 @@ CmdResult CommandNick::HandleLocal(const std::vector& 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; } } diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp index fbf772e0c..c82107be8 100644 --- a/src/modules/m_nonicks.cpp +++ b/src/modules/m_nonicks.cpp @@ -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; } -- cgit v1.2.3