Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2007-03-27 02:54:56 UTC
Modified files:
Tag: u2_10_12_branch
ircd/m_silence.c ChangeLog
Log message:
Do not try twice to process silences that were both added and deleted.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.168 ircu2.10/ChangeLog:1.710.2.169
--- ircu2.10/ChangeLog:1.710.2.168 Mon Mar 26 18:08:22 2007
+++ ircu2.10/ChangeLog Mon Mar 26 19:54:44 2007
@@ -1,5 +1,10 @@
2007-03-26 Michael Poole <[EMAIL PROTECTED]>
+ * ircd/m_silence.c (forward_silences): Do not try twice to process
+ silences that were both added and deleted.
+
+2007-03-26 Michael Poole <[EMAIL PROTECTED]>
+
* ircd/ircd_parser.y (portblock): Restore old behavior for Port
blocks with no host listed.
Index: ircu2.10/ircd/m_silence.c
diff -u ircu2.10/ircd/m_silence.c:1.11.2.1 ircu2.10/ircd/m_silence.c:1.11.2.2
--- ircu2.10/ircd/m_silence.c:1.11.2.1 Wed Feb 22 13:35:39 2006
+++ ircu2.10/ircd/m_silence.c Mon Mar 26 19:54:43 2007
@@ -22,7 +22,7 @@
*/
/** @file
* @brief Handlers for SILENCE command.
- * @version $Id: m_silence.c,v 1.11.2.1 2006/02/22 21:35:39 entrope Exp $
+ * @version $Id: m_silence.c,v 1.11.2.2 2007/03/27 02:54:43 entrope Exp $
*/
#include "config.h"
@@ -64,6 +64,7 @@
{
struct Ban *sile;
int flags;
+ int res;
char orig_mask[NICKLEN+USERLEN+HOSTLEN+3];
assert(mask && mask[0]);
@@ -100,7 +101,8 @@
}
/* Apply it to the silence list. */
- return apply_ban(&cli_user(sptr)->silence, sile, 1) ? NULL : sile;
+ res = apply_ban(&cli_user(sptr)->silence, sile, 1);
+ return res ? NULL : sile;
}
/** Apply and send silence updates for a user.
@@ -123,7 +125,6 @@
accepted[ac_count++] = sile;
}
-
if (MyUser(sptr)) {
size_t siles, maxsiles, totlength, maxlength, jj;
@@ -258,8 +259,9 @@
/* Free any silence-deleting updates. */
for (ii = 0; ii < ac_count; ++ii) {
- if (accepted[ii]->flags & BAN_DEL)
+ if ((accepted[ii]->flags & (BAN_ADD | BAN_DEL)) == BAN_DEL) {
free_ban(accepted[ii]);
+ }
}
}
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches