Committer : klmitch
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2005-01-03 13:24:47 UTC
Modified files:
ChangeLog ircd/s_user.c
Log message:
Author: Kev <[EMAIL PROTECTED]>
Log message:
Fix a core bug in is_silenced() when sptr is a server.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.527 ircu2.10/ChangeLog:1.528
--- ircu2.10/ChangeLog:1.527 Tue Dec 28 19:08:08 2004
+++ ircu2.10/ChangeLog Mon Jan 3 05:24:23 2005
@@ -1,3 +1,8 @@
+2005-01-03 Kevin L Mitchell <[EMAIL PROTECTED]>
+
+ * ircd/s_user.c (is_silenced): is_silenced() would core if sptr
+ was a server; fixed to skip servers
+
2004-12-28 Michael Poole <[EMAIL PROTECTED]>
* include/s_bsd.h (VirtualHost): Replace with separate variables
Index: ircu2.10/ircd/s_user.c
diff -u ircu2.10/ircd/s_user.c:1.86 ircu2.10/ircd/s_user.c:1.87
--- ircu2.10/ircd/s_user.c:1.86 Sat Dec 18 08:26:27 2004
+++ ircu2.10/ircd/s_user.c Mon Jan 3 05:24:36 2005
@@ -22,7 +22,7 @@
*/
/** @file
* @brief Miscellaneous user-related helper functions.
- * @version $Id: s_user.c,v 1.86 2004/12/18 16:26:27 klmitch Exp $
+ * @version $Id: s_user.c,v 1.87 2005/01/03 13:24:36 klmitch Exp $
*/
#include "config.h"
@@ -1671,7 +1671,7 @@
/** 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 @@
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));
----------------------- End of diff -----------------------