From 014d078f2475edf2ebc94dda5ddfe0c5bd1f260d Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Fri, 22 Apr 2005 23:36:31 +0000 Subject: [PATCH] Fix silence bugs found by coekie and ban application bug found by xplora. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1376 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 9 +++++++++ RELEASE.NOTES | 4 ++-- ircd/channel.c | 2 +- ircd/m_silence.c | 4 ++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f8aa68..f24d6d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-04-22 Michael Poole + + * 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 * ircd/m_userip.c (userip_formatter): /userip should *never* diff --git a/RELEASE.NOTES b/RELEASE.NOTES index a84bd73..b60bbdd 100644 --- a/RELEASE.NOTES +++ b/RELEASE.NOTES @@ -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. diff --git a/ircd/channel.c b/ircd/channel.c index 4821c4e..a593438 100644 --- a/ircd/channel.c +++ b/ircd/channel.c @@ -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); diff --git a/ircd/m_silence.c b/ircd/m_silence.c index f8ee5c3..97069d4 100644 --- a/ircd/m_silence.c +++ b/ircd/m_silence.c @@ -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; } -- 2.20.1