From 89aef424e98d44efaf6fa1bfdf0f13dadfa33b65 Mon Sep 17 00:00:00 2001 From: Xenthys Date: Sat, 10 Sep 2016 17:54:13 +0200 Subject: [PATCH] m_grant.c - fixed remote grant support --- modules/m_grant.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/m_grant.c b/modules/m_grant.c index 36ab0b30..20c3a622 100644 --- a/modules/m_grant.c +++ b/modules/m_grant.c @@ -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;