Log message:
If a user changes nickname to a nick that's banned on the channel, the ban
wouldn't take effect. Although minor, this is a bug, and may best be fixed
by invalidating all the ban caching for the user. This is effected by
looping over all the user's channel memberships and doing a ClearBanValid()
on them.
(pull-up from u2.10.11 branch)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@685
c9e4aea6-c8fd-4c43-8297-
357d70d61c8c
+2002-03-25 Kevin L Mitchell <klmitch@mit.edu>
+
+ * ircd/s_user.c (set_nick_name): invalidate all ban valid caching
+ when a user changes his nickname so we can catch if he now matches
+ a ban
+
2002-03-20 Reed Loden <reed@redmagnet.com>
* doc/example.conf: Added OPER_LIST_CHAN and LOCOP_LIST_CHAN.
*/
if (MyUser(sptr)) {
const char* channel_name;
+ struct Membership *member;
if ((channel_name = find_no_nickchange_channel(sptr))) {
return send_reply(cptr, ERR_BANNICKCHANGE, channel_name);
}
if (cli_nextnick(cptr) < CurrentTime)
cli_nextnick(cptr) = CurrentTime;
}
+ /* Invalidate all bans against the user so we check them again */
+ for (member = (cli_user(cptr))->channel; member;
+ member = member->next_channel)
+ ClearBanValid(member);
}
/*
* Also set 'lastnick' to current time, if changed.