git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1458
c9e4aea6-c8fd-4c43-8297-
357d70d61c8c
+2005-08-16 Michael Poole <mdpoole@troilus.org>
+
+ * ircd/channel.c (mode_parse_ban): Avoid overwriting part of
+ newban->banstr[] when the source is a server. (Spotted by jcq.)
+
2005-08-16 Michael Poole <mdpoole@troilus.org>
* ircd/channel.c (joinbuf_join): Switch to &his instead of &me for
newban->flags = ((state->dir == MODE_ADD) ? BAN_ADD : BAN_DEL)
| (*flag_p == MODE_BAN ? 0 : BAN_EXCEPTION);
set_ban_mask(newban, collapse(pretty_mask(t_str)));
- ircd_strncpy(newban->who, cli_name(state->sptr), HOSTLEN);
+ ircd_strncpy(newban->who, IsUser(state->sptr) ? cli_name(state->sptr) : "*", NICKLEN);
newban->when = TStime();
apply_ban(&state->chptr->banlist, newban, 0);
}