From b4e3861bf9ffa46ae7498587320bded7baad78ef Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Wed, 13 Jan 2016 16:56:05 -0600 Subject: [PATCH] ircd: get_channel_access(): allow override hooks to work without a membership pointer --- ircd/chmode.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ircd/chmode.c b/ircd/chmode.c index c3cd165d..848cd101 100644 --- a/ircd/chmode.c +++ b/ircd/chmode.c @@ -187,14 +187,11 @@ get_channel_access(struct Client *source_p, struct membership *msptr, int dir, c if(!MyClient(source_p)) return CHFL_CHANOP; - if (msptr == NULL) - return CHFL_PEON; - moduledata.client = source_p; moduledata.chptr = msptr->chptr; moduledata.msptr = msptr; moduledata.target = NULL; - moduledata.approved = is_chanop(msptr) ? CHFL_CHANOP : CHFL_PEON; + moduledata.approved = (msptr != NULL && is_chanop(msptr)) ? CHFL_CHANOP : CHFL_PEON; moduledata.dir = dir; moduledata.modestr = modestr;