From 96d26127654a79d2a85424fabeea39e7fd4fa86a Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Tue, 14 Dec 2010 23:04:11 -0600 Subject: [PATCH] Don't bother running the get_channel_access hook if the client is not really on the channel. --- src/chmode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/chmode.c b/src/chmode.c index 1976765f..8008a793 100644 --- a/src/chmode.c +++ b/src/chmode.c @@ -194,6 +194,9 @@ get_channel_access(struct Client *source_p, struct membership *msptr) if(!MyClient(source_p)) return CHFL_CHANOP; + if (msptr == NULL) + return CHFL_PEON; + moduledata.client = source_p; moduledata.chptr = msptr->chptr; moduledata.msptr = msptr;