Fixes bug SF#
1840011.
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1846
c9e4aea6-c8fd-4c43-8297-
357d70d61c8c
+2007-11-28 Michael Poole <mdpoole@troilus.org>
+
+ * ircd/channel.c (mode_ban_invalidate): Clarify Doxygen comments.
+ (apply_ban): Only block narrower bans if the wider ban is active.
+
2007-11-24 Michael Poole <mdpoole@troilus.org>
* ircd/m_names.c (do_names): Don't try to re-initialize the start
2007-11-24 Michael Poole <mdpoole@troilus.org>
* ircd/m_names.c (do_names): Don't try to re-initialize the start
-/** Simple function to invalidate bans
+/** Simple function to invalidate a channel's ban cache.
- * This function sets all bans as being valid.
+ * This function marks all members of the channel as being neither
+ * banned nor banned.
*
* @param chan The channel to operate on.
*/
*
* @param chan The channel to operate on.
*/
assert(newban->flags & (BAN_ADD|BAN_DEL));
if (newban->flags & BAN_ADD) {
size_t totlen = 0;
assert(newban->flags & (BAN_ADD|BAN_DEL));
if (newban->flags & BAN_ADD) {
size_t totlen = 0;
- /* If a less specific entry is found, fail. */
+ /* If a less specific *active* entry is found, fail. */
for (ban = *banlist; ban; ban = ban->next) {
for (ban = *banlist; ban; ban = ban->next) {
- if (!bmatch(ban, newban)) {
+ if (!bmatch(ban, newban) && !(ban->flags & BAN_DEL)) {
if (do_free)
free_ban(newban);
return 1;
if (do_free)
free_ban(newban);
return 1;