diff --git a/Changelog b/Changelog index 78311e3..355b69d 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,7 @@ [Changes 1.2c01] +* Fix the /TKB (timed kickban) command. (caf) + * Rewrite termcap/terminfo detection logic in configure and include term.h in term.c for the system definition of tparm(). This fixes a crash on NetBSD x86-64 (reported by jeezy), and should also ensure that terminfo diff --git a/source/banlist.c b/source/banlist.c index 29d93bf..9ff540e 100644 --- a/source/banlist.c +++ b/source/banlist.c @@ -1021,16 +1021,16 @@ BUILT_IN_COMMAND(kickban) reset_display_target(); return; } + if (command && (!my_stricmp(command, "TBK") || !my_stricmp(command, "TKB"))) { char *string_time; time = get_cset_int_var(chan->csets, BANTIME_CSET); if ((string_time = next_arg(args, &args))) time = atoi(string_time); - malloc_sprintf(&rest, "Timed kickban for %s", convert_time(time)); rest = args; - if (rest && !*rest) - rest = NULL; + if (!rest || !*rest) + rest = m_sprintf("Timed kickban for %s", convert_time(time)); } else {