]> jfr.im git - solanum.git/blobdiff - modules/m_grant.c
Merge pull request #277 from edk0/helpops
[solanum.git] / modules / m_grant.c
index 1f0b05028f39afcf07c4392051cb17794f1ac504..20c3a6226031594c759234f440d398fbfc809623 100644 (file)
@@ -107,7 +107,7 @@ void grant_revoke(struct Client *const source,
 static
 void grant(struct MsgBuf *msgbuf, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
-       if(!HasPrivilege(source_p, "oper:grant"))
+       if(MyClient(source_p) && !HasPrivilege(source_p, "oper:grant"))
        {
                sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "grant");
                return;
@@ -129,7 +129,7 @@ void grant(struct MsgBuf *msgbuf, struct Client *client_p, struct Client *source
                return;
        }
 
-       if(!find_shared_conf(source_p->username, source_p->host, source_p->servptr->name, SHARED_GRANT))
+       if(!MyClient(source_p) && !find_shared_conf(source_p->username, source_p->host, source_p->servptr->name, SHARED_GRANT))
        {
                sendto_one_notice(source_p, ":GRANT failed: You have no shared configuration block on this server.");
                return;
@@ -167,19 +167,24 @@ struct Message msgtab =
        }
 };
 
-mapi_clist_av1 clist[] =
+mapi_clist_av1 grant_clist[] =
 {
        &msgtab,
        NULL
 };
 
-DECLARE_MODULE_AV1
+static const char grant_desc[] =
+       "Provides the grant facility for giving other users specific privilege sets";
+
+DECLARE_MODULE_AV2
 (
        grant,
        NULL,
        NULL,
-       clist,
+       grant_clist,
+       NULL,
+       NULL,
        NULL,
        NULL,
-       "$Revision$"
+       grant_desc
 );