summaryrefslogtreecommitdiff
path: root/src/coremods
diff options
context:
space:
mode:
Diffstat (limited to 'src/coremods')
-rw-r--r--src/coremods/core_privmsg.cpp5
-rw-r--r--src/coremods/core_user/cmd_nick.cpp7
2 files changed, 7 insertions, 5 deletions
diff --git a/src/coremods/core_privmsg.cpp b/src/coremods/core_privmsg.cpp
index 6c5b7557e..29756a4c2 100644
--- a/src/coremods/core_privmsg.cpp
+++ b/src/coremods/core_privmsg.cpp
@@ -141,11 +141,12 @@ CmdResult MessageCommandBase::HandleMessage(const std::vector<std::string>& para
return CMD_FAILURE;
}
- if (ServerInstance->Config->RestrictBannedUsers)
+ if (ServerInstance->Config->RestrictBannedUsers != ServerConfig::BUT_NORMAL)
{
if (chan->IsBanned(user))
{
- user->WriteNumeric(ERR_CANNOTSENDTOCHAN, chan->name, "Cannot send to channel (you're banned)");
+ if (ServerInstance->Config->RestrictBannedUsers == ServerConfig::BUT_RESTRICT_NOTIFY)
+ user->WriteNumeric(ERR_CANNOTSENDTOCHAN, chan->name, "Cannot send to channel (you're banned)");
return CMD_FAILURE;
}
}
diff --git a/src/coremods/core_user/cmd_nick.cpp b/src/coremods/core_user/cmd_nick.cpp
index 672155741..80bfbe674 100644
--- a/src/coremods/core_user/cmd_nick.cpp
+++ b/src/coremods/core_user/cmd_nick.cpp
@@ -70,15 +70,16 @@ CmdResult CommandNick::HandleLocal(const std::vector<std::string>& parameters, L
// Disallow the nick change if <security:restrictbannedusers> is on and there is a ban matching this user in
// one of the channels they are on
- if (ServerInstance->Config->RestrictBannedUsers)
+ if (ServerInstance->Config->RestrictBannedUsers != ServerConfig::BUT_NORMAL)
{
for (User::ChanList::iterator i = user->chans.begin(); i != user->chans.end(); ++i)
{
Channel* chan = (*i)->chan;
if (chan->GetPrefixValue(user) < VOICE_VALUE && chan->IsBanned(user))
{
- user->WriteNumeric(ERR_CANTCHANGENICK, InspIRCd::Format("Cannot change nickname while on %s (you're banned)",
- chan->name.c_str()));
+ if (ServerInstance->Config->RestrictBannedUsers == ServerConfig::BUT_RESTRICT_NOTIFY)
+ user->WriteNumeric(ERR_CANTCHANGENICK, InspIRCd::Format("Cannot change nickname while on %s (you're banned)",
+ chan->name.c_str()));
return CMD_FAILURE;
}
}