summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-28 17:32:44 +0000
committerrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-28 17:32:44 +0000
commit6794273f7d44987b061f038bc3c7909fa64a86d5 (patch)
tree36b97209fa498c821c3efee7f1e814513d4df7ee
parente8ce6e0b103b4c9b6b5eccbf4e35cce044674fa7 (diff)
Oper restrictions on memoserv commands.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2138 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--src/core/ms_info.c2
-rw-r--r--src/core/ms_sendall.c6
-rw-r--r--src/core/ms_set.c2
-rw-r--r--src/core/ms_staff.c6
4 files changed, 14 insertions, 2 deletions
diff --git a/src/core/ms_info.c b/src/core/ms_info.c
index 68cf9e11d..1f531a0f9 100644
--- a/src/core/ms_info.c
+++ b/src/core/ms_info.c
@@ -33,7 +33,7 @@ class CommandMSInfo : public Command
int is_servadmin = is_services_admin(u);
int hardmax = 0;
- if (is_servadmin && name && *name != '#')
+ if (name && *name != '#' && u->nc->HasPriv("memoserv/info"))
{
na = findnick(name);
if (!na)
diff --git a/src/core/ms_sendall.c b/src/core/ms_sendall.c
index c94a48776..c359eb491 100644
--- a/src/core/ms_sendall.c
+++ b/src/core/ms_sendall.c
@@ -30,6 +30,12 @@ class CommandMSSendAll : public Command
NickCore *nc;
const char *text = params[0].c_str();
+ if (!u->nc->HasCommand("memoserv/sendall"))
+ {
+ // XXX: error?
+ return MOD_CONT;
+ }
+
if (readonly)
{
notice_lang(s_MemoServ, u, MEMO_SEND_DISABLED);
diff --git a/src/core/ms_set.c b/src/core/ms_set.c
index 67d792047..64d897187 100644
--- a/src/core/ms_set.c
+++ b/src/core/ms_set.c
@@ -75,7 +75,7 @@ class CommandMSSet : public Command
int32 limit;
NickCore *nc = u->nc;
ChannelInfo *ci = NULL;
- int is_servadmin = is_services_admin(u);
+ bool is_servadmin = u->nc->HasPriv("memoserv/set-limit");
if (*p1 == '#')
{
diff --git a/src/core/ms_staff.c b/src/core/ms_staff.c
index aa1e4a358..38506981c 100644
--- a/src/core/ms_staff.c
+++ b/src/core/ms_staff.c
@@ -30,6 +30,12 @@ class CommandMSStaff : public Command
int i, z = 0;
const char *text = params[0].c_str();
+ if (!u->nc->HasCommand("memoserv/staff"))
+ {
+ // XXX: error?
+ return MOD_CONT;
+ }
+
if (readonly)
{
notice_lang(s_MemoServ, u, MEMO_SEND_DISABLED);