summaryrefslogtreecommitdiff
path: root/src/chanserv.c
diff options
context:
space:
mode:
authorRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-30 18:45:10 +0000
committerRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-30 18:45:10 +0000
commit431918ceacfd5a580d4f28a8ae6077c9bbc44b99 (patch)
tree27dcb4182ee1041f9160df28e3266165412285ae /src/chanserv.c
parent2fd6bf39b1b018a7081fafd8350ea88f1b733ea5 (diff)
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
Diffstat (limited to 'src/chanserv.c')
-rw-r--r--src/chanserv.c119
1 files changed, 0 insertions, 119 deletions
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 <channel>). 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. */