From e1dc9e549fe1bb55db6063dba7dab3eecca5805c Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sat, 10 Dec 2011 00:45:57 +0100 Subject: [PATCH] Apply the same restrictions to ban forwarding as to +f. --- src/chmode.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/chmode.c b/src/chmode.c index 7482c277..e2c05b3e 100644 --- a/src/chmode.c +++ b/src/chmode.c @@ -873,9 +873,16 @@ chm_ban(struct Client *source_p, struct Channel *chptr, return; } - if(forward != NULL && !ConfigChannel.use_forward && - MyClient(source_p)) - forward = NULL; + /* For compatibility, only check the forward channel from + * local clients. Accept any forward channel from servers. + */ + if(forward != NULL && MyClient(source_p)) + { + if(!ConfigChannel.use_forward) + forward = NULL; + else if(!check_forward(source_p, chptr, forward)) + return; + } /* dont allow local clients to overflow the banlist, dont * let remote servers set duplicate bans