*/
#include "config.h"
-#if 0
-/*
- * No need to include handlers.h here the signatures must match
- * and we don't need to force a rebuild of all the handlers everytime
- * we add a new one to the list. --Bleep
- */
-#include "handlers.h"
-#endif /* 0 */
#include "channel.h"
#include "client.h"
#include "hash.h"
#include "msg.h"
#include "numeric.h"
#include "numnicks.h"
+#include "s_bsd.h"
#include "send.h"
#include <assert.h>
send_reply(sptr, RPL_LISTUSAGE,
" \002T>\002\037min_minutes\037 ; Channels with a topic last "
"set more than \037min_minutes\037 ago.");
+ if (IsAnOper(sptr))
+ send_reply(sptr, RPL_LISTUSAGE,
+ " \002S\002 ; Show secret channels.");
send_reply(sptr, RPL_LISTUSAGE,
"Example: LIST <3,>1,C<10,T>0 ; 2 users, younger than 10 "
"min., topic set.");
case 'T':
case 't':
is_time++;
- args->topic_limits = 1;
+ args->flags |= LISTARG_TOPICLIMITS;
/*FALLTHROUGH*/
case 'C':
}
break;
+ case 'S':
+ case 's':
+ if (!IsAnOper(sptr))
+ return show_usage(sptr);
+
+ args->flags |= LISTARG_SHOWSECRET;
+ param++;
+
+ if (*param != ',' && *param != ' ' && *param !+ '\0') /* check syntax */
+ return show_usage(sptr);
+ break;
+
default: /* channel name? */
if (!permit_chan || !IsChannelName(param))
return show_usage(sptr);
MyFree(cli_listing(sptr));
cli_listing(sptr) = 0;
send_reply(sptr, RPL_LISTEND);
- if (parc < 2)
- return 0; /* Let LIST abort a listing. */
+ update_write(sptr);
+ if (parc < 2 || 0 == ircd_strcmp("STOP", parv[1]))
+ return 0; /* Let LIST or LIST STOP abort a listing. */
}
if (parc < 2) /* No arguments given to /LIST ? */