summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-10-18 16:52:51 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-10-18 16:52:51 +0000
commit66cc5f8ff0a96477fb6badaec1bc1cd8c4838ce3 (patch)
treed474386714968de3075be955cabe51e7e63ed24d
parent0d3ecb964292600ec1ce6ee1cef83f72185a8bcc (diff)
Make use of privs for PRIVMSG also.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10663 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/commands/cmd_privmsg.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/commands/cmd_privmsg.cpp b/src/commands/cmd_privmsg.cpp
index 135ab809e..7354307fe 100644
--- a/src/commands/cmd_privmsg.cpp
+++ b/src/commands/cmd_privmsg.cpp
@@ -30,8 +30,11 @@ CmdResult CommandPrivmsg::Handle (const std::vector<std::string>& parameters, Us
if (ServerInstance->Parser->LoopCall(user, this, parameters, 0))
return CMD_SUCCESS;
- if ((parameters[0][0] == '$') && (IS_OPER(user) || ServerInstance->ULine(user->server)))
+ if (parameters[0][0] == '$')
{
+ if (!user->HasPrivPermission("users/mass-message"))
+ return CMD_SUCCESS;
+
int MOD_RESULT = 0;
std::string temp = parameters[1];
FOREACH_RESULT(I_OnUserPreMessage,OnUserPreMessage(user, (void*)parameters[0].c_str(), TYPE_SERVER, temp, 0, except_list));