From: Kevin L. Mitchell Date: Mon, 3 Jan 2005 13:24:36 +0000 (+0000) Subject: Author: Kev X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=commitdiff_plain;h=88c85bf338cae1494980e6a4a08d151cda63921e Author: Kev Log message: Fix a core bug in is_silenced() when sptr is a server. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1291 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- diff --git a/ChangeLog b/ChangeLog index 405c659..f96560b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-01-03 Kevin L Mitchell + + * ircd/s_user.c (is_silenced): is_silenced() would core if sptr + was a server; fixed to skip servers + 2004-12-28 Michael Poole * include/s_bsd.h (VirtualHost): Replace with separate variables diff --git a/ircd/s_user.c b/ircd/s_user.c index 1f26e6f..364ddd3 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -1671,7 +1671,7 @@ void set_snomask(struct Client *cptr, unsigned int newmask, int what) /** Check whether \a sptr is allowed to send a message to \a acptr. * If \a sptr is a remote user, it means some server has an outdated * SILENCE list for \a acptr, so send the missing SILENCE mask(s) back - * in the direction of \a sptr. + * in the direction of \a sptr. Skip the check if \a sptr is a server. * @param[in] sptr Client trying to send a message. * @param[in] acptr Destination of message. * @return Non-zero if \a sptr is SILENCEd by \a acptr, zero if not. @@ -1683,7 +1683,7 @@ int is_silenced(struct Client *sptr, struct Client *acptr) size_t buf_used, slen; char buf[BUFSIZE]; - if (!(user = cli_user(acptr)) + if (IsServer(sptr) || !(user = cli_user(acptr)) || !(found = find_ban(sptr, user->silence))) return 0; assert(!(found->flags & BAN_EXCEPTION));