+2007-11-04 Michael Poole <mdpoole@troilus.org>
+
+ * ircd/m_list.c (param_parse): Reverse comparison direction when
+ converting from minutes to time_t, and which bound is set (so that
+ T<time_t works correctly). Also switch is_time cases so that 'T'
+ and 'C' work as documented. Remove a "break" after a "return".
+
+ (m_list): Remove a "break" after a "return".
+
2007-10-29 Michael Poole <mdpoole@troilus.org>
* ircd/ircd_lexer.l (YY_INPUT): Redefine to use fbgets().
if (*param != ',' && *param != ' ' && *param != '\0') /* check syntax */
return show_usage(sptr);
- if (is_time && val < 80000000) /* Toggle UTC/offset */
- val = TStime() - val * 60;
+ if (is_time && val < 80000000) {
+ /* Convert age to timestamp and reverse direction */
+ val = TStime() - val * 60;
+ dir = (dir == '>') ? '<' : '>';
+ }
switch (is_time) {
case 0: /* number of users on channel */
args->min_users = val;
break;
- case 1: /* channel topic */
+ case 1: /* channel creation time */
if (dir == '<')
- args->min_topic_time = val;
+ args->max_time = val;
else
- args->max_topic_time = val;
+ args->min_time = val;
break;
- case 2: /* channel creation time */
+ case 2: /* channel topic */
if (dir == '<')
- args->min_time = val;
+ args->max_topic_time = val;
else
- args->max_time = val;
+ args->min_topic_time = val;
break;
}
break;
return show_usage(sptr);
return LPARAM_CHANNEL;
- break;
}
if (!*param) /* hit end of string? */
switch (param_parse(sptr, parv[param], &args, parc == 2)) {
case LPARAM_ERROR: /* error encountered, usage already sent, return */
return 0;
- break;
case LPARAM_CHANNEL: /* show channel instead */
show_channels++;