From 431918ceacfd5a580d4f28a8ae6077c9bbc44b99 Mon Sep 17 00:00:00 2001 From: "Robin Burchell w00t@inspircd.org" Date: Tue, 30 Sep 2008 18:45:10 +0000 Subject: listnicks and listchans go away, as they aren't all that useful (and way too old.) git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1201 5417fbe8-f217-4b02-8779-1006273d7864 --- src/chanserv.c | 119 --------------------------------------------------------- 1 file changed, 119 deletions(-) (limited to 'src/chanserv.c') diff --git a/src/chanserv.c b/src/chanserv.c index 442faec59..4c64dd64e 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -182,125 +182,6 @@ char *get_mlock_modes(ChannelInfo * ci, int complete) return res; } -/* Display total number of registered channels and info about each; or, if - * a specific channel is given, display information about that channel - * (like /msg ChanServ INFO ). If count_only != 0, then only - * display the number of registered channels (the channel parameter is - * ignored). - */ - -void listchans(int count_only, const char *chan) -{ - int count = 0; - ChannelInfo *ci; - int i; - - if (count_only) { - - for (i = 0; i < 256; i++) { - for (ci = chanlists[i]; ci; ci = ci->next) - count++; - } - printf("%d channels registered.\n", count); - - } else if (chan) { - - struct tm *tm; - char buf[BUFSIZE]; - - if (!(ci = cs_findchan(chan))) { - printf("Channel %s not registered.\n", chan); - return; - } - if (ci->flags & CI_VERBOTEN) { - printf("Channel %s is FORBIDden.\n", ci->name); - } else { - printf("Information about channel %s:\n", ci->name); - printf(" Founder: %s\n", ci->founder->display); - printf(" Description: %s\n", ci->desc); - tm = localtime(&ci->time_registered); - strftime(buf, sizeof(buf), - getstring(NULL, STRFTIME_DATE_TIME_FORMAT), tm); - printf(" Registered: %s\n", buf); - tm = localtime(&ci->last_used); - strftime(buf, sizeof(buf), - getstring(NULL, STRFTIME_DATE_TIME_FORMAT), tm); - printf(" Last used: %s\n", buf); - if (ci->last_topic) { - printf(" Last topic: %s\n", ci->last_topic); - printf(" Topic set by: %s\n", ci->last_topic_setter); - } - if (ci->url) - printf(" URL: %s\n", ci->url); - if (ci->email) - printf(" E-mail address: %s\n", ci->email); - printf(" Options: "); - if (!ci->flags) { - printf("None\n"); - } else { - int need_comma = 0; - static const char commastr[] = ", "; - if (ci->flags & CI_PRIVATE) { - printf("Private"); - need_comma = 1; - } - if (ci->flags & CI_KEEPTOPIC) { - printf("%sTopic Retention", - need_comma ? commastr : ""); - need_comma = 1; - } - if (ci->flags & CI_TOPICLOCK) { - printf("%sTopic Lock", need_comma ? commastr : ""); - need_comma = 1; - } - if (ci->flags & CI_SECUREOPS) { - printf("%sSecure Ops", need_comma ? commastr : ""); - need_comma = 1; - } - if (ci->flags & CI_RESTRICTED) { - printf("%sRestricted Access", - need_comma ? commastr : ""); - need_comma = 1; - } - if (ci->flags & CI_SECURE) { - printf("%sSecure", need_comma ? commastr : ""); - need_comma = 1; - } - if (ci->flags & CI_NO_EXPIRE) { - printf("%sNo Expire", need_comma ? commastr : ""); - need_comma = 1; - } - printf("\n"); - } - if (ci->mlock_on || ci->mlock_off) { - printf(" Mode lock: %s\n", get_mlock_modes(ci, 1)); - } - if (ci->flags & CI_SUSPENDED) { - printf - ("This nickname is currently suspended by %s, reason: %s\n", - ci->forbidby, - (ci->forbidreason ? ci->forbidreason : "No reason")); - } - } - - } else { - - for (i = 0; i < 256; i++) { - for (ci = chanlists[i]; ci; ci = ci->next) { - printf(" %s %-20s %s\n", - ci->flags & CI_NO_EXPIRE ? "!" : " ", ci->name, - ci->flags & CI_VERBOTEN ? - "Disallowed (FORBID)" : (ci->flags & CI_SUSPENDED ? - "Disallowed (SUSPENDED)" : - ci->desc)); - count++; - } - } - printf("%d channels registered.\n", count); - - } -} - /*************************************************************************/ /* Return information on memory use. Assumes pointers are valid. */ -- cgit