From 2ef3dffd4781082988ffaaab3d786733b1b96a18 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Thu, 13 Sep 2012 01:01:05 +0200 Subject: Don't allow banned users to NOTICE a channel when security:restrictbannedusers is on Fixes #297 reported by @killerrabbit --- src/commands/cmd_notice.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/commands') diff --git a/src/commands/cmd_notice.cpp b/src/commands/cmd_notice.cpp index e10d6286d..b060a534f 100644 --- a/src/commands/cmd_notice.cpp +++ b/src/commands/cmd_notice.cpp @@ -110,6 +110,15 @@ CmdResult CommandNotice::Handle (const std::vector& parameters, Use user->WriteNumeric(404, "%s %s :Cannot send to channel (+m)", user->nick.c_str(), chan->name.c_str()); return CMD_FAILURE; } + + if (ServerInstance->Config->RestrictBannedUsers) + { + if (chan->IsBanned(user)) + { + user->WriteNumeric(404, "%s %s :Cannot send to channel (you're banned)", user->nick.c_str(), chan->name.c_str()); + return CMD_FAILURE; + } + } } ModResult MOD_RESULT; -- cgit v1.2.3