summaryrefslogtreecommitdiff
path: root/src/coremods/core_privmsg.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-07-10 20:32:08 +0100
committerPeter Powell <petpow@saberuk.com>2018-07-10 21:01:35 +0100
commit2a022cb9b7ed10d929beb96b6fcc2f1aa6a910f3 (patch)
tree9c1b733a6e65f8808a2fcf99cc611ab28b9d3785 /src/coremods/core_privmsg.cpp
parent5585654df265bc37d547fa7738e35cc7ae7dacbb (diff)
Add a silent option to <options:restrictbannedusers>.
This is useful when dealing with spambots that switch method when they receive ERR_CANNOTSENDTOCHAN.
Diffstat (limited to 'src/coremods/core_privmsg.cpp')
-rw-r--r--src/coremods/core_privmsg.cpp5
1 files changed, 3 insertions, 2 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;
}
}