Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2007-11-05 02:42:21 UTC
Modified files:
Tag: u2_10_12_branch
ircd/m_list.c ChangeLog
Log message:
Fix a few bugs that made LIST work confusingly with T and C qualifiers.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.210 ircu2.10/ChangeLog:1.710.2.211
--- ircu2.10/ChangeLog:1.710.2.210 Mon Oct 29 19:13:09 2007
+++ ircu2.10/ChangeLog Sun Nov 4 18:42:11 2007
@@ -1,3 +1,12 @@
+2007-11-04 Michael Poole <[EMAIL PROTECTED]>
+
+ * 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 <[EMAIL PROTECTED]>
* ircd/ircd_lexer.l (YY_INPUT): Redefine to use fbgets().
Index: ircu2.10/ircd/m_list.c
diff -u ircu2.10/ircd/m_list.c:1.16 ircu2.10/ircd/m_list.c:1.16.2.1
--- ircu2.10/ircd/m_list.c:1.16 Mon Jun 20 06:22:45 2005
+++ ircu2.10/ircd/m_list.c Sun Nov 4 18:42:11 2007
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: m_list.c,v 1.16 2005/06/20 13:22:45 a1kmm Exp $
+ * $Id: m_list.c,v 1.16.2.1 2007/11/05 02:42:11 entrope Exp $
*/
/*
@@ -220,8 +220,11 @@
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 */
@@ -231,18 +234,18 @@
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;
@@ -304,7 +307,6 @@
return show_usage(sptr);
return LPARAM_CHANNEL;
- break;
}
if (!*param) /* hit end of string? */
@@ -360,7 +362,6 @@
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++;
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches