1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 12:23:13 +02:00

Oper restrictions on memoserv commands.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2138 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
rburchell
2009-02-28 17:32:44 +00:00
parent e8ce6e0b10
commit 6794273f7d
4 changed files with 14 additions and 2 deletions
+1 -1
View File
@@ -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)
+6
View File
@@ -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);
+1 -1
View File
@@ -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 == '#')
{
+6
View File
@@ -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);