Apply the same restrictions to ban forwarding as to +f.

This commit is contained in:
Jilles Tjoelker 2011-12-10 00:45:57 +01:00
parent 0c7303213e
commit e1dc9e549f

View file

@ -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