summaryrefslogtreecommitdiff
path: root/src/commands/cmd_notice.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-10-18 16:52:48 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-10-18 16:52:48 +0000
commit0d3ecb964292600ec1ce6ee1cef83f72185a8bcc (patch)
tree976feadbe1a37f03cf91149bc8d4c930f90e592e /src/commands/cmd_notice.cpp
parentf43283920224b3d762ae371d7320024512a8afde (diff)
Working privs implementation, and example usage in NOTICE for mass messaging.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10662 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands/cmd_notice.cpp')
-rw-r--r--src/commands/cmd_notice.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/commands/cmd_notice.cpp b/src/commands/cmd_notice.cpp
index 37f11eeb9..537f8ac78 100644
--- a/src/commands/cmd_notice.cpp
+++ b/src/commands/cmd_notice.cpp
@@ -30,8 +30,11 @@ CmdResult CommandNotice::Handle (const std::vector<std::string>& parameters, Use
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_OnUserPreNotice,OnUserPreNotice(user, (void*)parameters[0].c_str(), TYPE_SERVER, temp, 0, exempt_list));