Fix silence bugs found by coekie and ban application bug found by xplora.
authorMichael Poole <mdpoole@troilus.org>
Fri, 22 Apr 2005 23:36:31 +0000 (23:36 +0000)
committerMichael Poole <mdpoole@troilus.org>
Fri, 22 Apr 2005 23:36:31 +0000 (23:36 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1376 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
RELEASE.NOTES
ircd/channel.c
ircd/m_silence.c

index 2f8aa68e828d17bc3b3fb285392f6bed5f1622f6..f24d6d0e1ccccb20c7b04b820b47972934bd4871 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-04-22  Michael Poole <mdpoole@troilus.org>
+
+       * RELEASE.NOTES: Silence exceptions use ~, not -.  Oops!
+
+       * ircd/channel.c (mode_parse_ban): Use correct test for flag_p.
+
+       * ircd/m_silence.c (apply_silence): Make mask pretty so that later
+       processing does not convert * to @ (and match no one).
+
 2005-04-21  Kevin L. Mitchell  <klmitch@mit.edu>
 
        * ircd/m_userip.c (userip_formatter): /userip should *never*
index a84bd73938f70d76e32b979d624eefa123b05387..b60bbdd7012a569f4bb18d1a0fa4f754ae644e6e 100644 (file)
@@ -63,8 +63,8 @@ By default, all of these are hidden from normal users.
 Client blocks (previously I: lines), Operator blocks (previously O:
 and o: lines), channel bans and silences may use CIDR notation instead
 of simple wildcards.  You may also have silence exceptions by putting
-'-' before the mask; for example, if you wish to silence everyone
-except X, you could use SILENCE *!*@*,-X!cservice@undernet.org.
+'~' before the mask; for example, if you wish to silence everyone
+except X, you could use SILENCE *!*@*,~X!cservice@undernet.org.
 
 The server will no longer kick "net riders" in keyed (+k) channels if
 both sides of the net join have the same key.
index 4821c4eb878e37603c8a74ca2a799b5ab39c15f5..a593438595df47040b5084914d160d8c803f6675 100644 (file)
@@ -2787,7 +2787,7 @@ mode_parse_ban(struct ParseState *state, int *flag_p)
   newban = state->banlist + (state->numbans++);
   newban->next = 0;
   newban->flags = ((state->dir == MODE_ADD) ? BAN_ADD : BAN_DEL)
-      | (*flag_p == 'b' ? 0 : BAN_EXCEPTION);
+      | (*flag_p == MODE_BAN ? 0 : BAN_EXCEPTION);
   newban->banstr = NULL;
   set_ban_mask(newban, collapse(pretty_mask(t_str)));
   newban->who = cli_name(state->sptr);
index f8ee5c3f83a4ac6615a41bd9bb69e9a6bd51dc52..97069d4d9552de5ec0360873ee48e63bd5abd0fd 100644 (file)
@@ -60,7 +60,7 @@
  * @return The new ban entry on success, NULL on failure.
  */
 static struct Ban *
-apply_silence(struct Client *sptr, const char *mask)
+apply_silence(struct Client *sptr, char *mask)
 {
   struct Ban *sile;
   int flags;
@@ -84,7 +84,7 @@ apply_silence(struct Client *sptr, const char *mask)
   }
 
   /* Make the silence, set flags, and apply it. */
-  sile = make_ban(mask);
+  sile = make_ban(pretty_mask(mask));
   sile->flags |= flags;
   return apply_ban(&cli_user(sptr)->silence, sile, 1) ? NULL : sile;
 }