summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrstein drstein@31f1291d-b8d6-0310-a050-a5561fc1590b <drstein drstein@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2008-02-12 17:44:54 +0000
committerdrstein drstein@31f1291d-b8d6-0310-a050-a5561fc1590b <drstein drstein@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2008-02-12 17:44:54 +0000
commit1a3f71be6037bb70a8027f7904fff8cea2d2e979 (patch)
tree5c4fe14fe9f6c9f4342fede5b8edbf6d89781f1b /src
parent62de724353408bcf0c6aa889f4f03615c466b60e (diff)
BUILD : 1.7.21 (1387) BUGS : 869 NOTES : Added SUSPENDED to NS LIST keywords.
git-svn-id: svn://svn.anope.org/anope/trunk@1387 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1102 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/core/ns_list.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/ns_list.c b/src/core/ns_list.c
index 5cf00cfbb..6c6639f66 100644
--- a/src/core/ns_list.c
+++ b/src/core/ns_list.c
@@ -81,6 +81,8 @@ int do_list(User * u)
* SADMINS will be shown forbidden nicks and the "!" indicator.
* Syntax for sadmins: LIST pattern [FORBIDDEN] [NOEXPIRE]
* -TheShadow
+ *
+ * UPDATE: SUSPENDED keyword is now accepted as well.
*/
@@ -94,6 +96,7 @@ int do_list(User * u)
int16 matchflags = 0;
NickRequest *nr = NULL;
int nronly = 0;
+ int susp_keyword = 0;
char noexpire_char = ' ';
int count = 0, from = 0, to = 0, tofree = 0;
char *tmp = NULL;
@@ -152,6 +155,8 @@ int do_list(User * u)
matchflags |= NS_VERBOTEN;
if (stricmp(keyword, "NOEXPIRE") == 0)
matchflags |= NS_NO_EXPIRE;
+ if (stricmp(keyword, "SUSPENDED") == 0)
+ susp_keyword = 1;
if (stricmp(keyword, "UNCONFIRMED") == 0)
nronly = 1;
}
@@ -168,7 +173,9 @@ int do_list(User * u)
if ((na->nc->flags & NI_PRIVATE) && !is_servadmin
&& na->nc != mync)
continue;
- if ((matchflags != 0) && !(na->status & matchflags))
+ if ((matchflags != 0) && !(na->status & matchflags) && (susp_keyword == 0))
+ continue;
+ else if ((susp_keyword == 1) && !(na->nc->flags & NI_SUSPENDED))
continue;
/* We no longer compare the pattern against the output buffer.
@@ -198,6 +205,9 @@ int do_list(User * u)
} else if (na->status & NS_VERBOTEN) {
snprintf(buf, sizeof(buf),
"%-20s [Forbidden]", na->nick);
+ } else if (na->nc->flags & NI_SUSPENDED) {
+ snprintf(buf, sizeof(buf),
+ "%-20s [Suspended]", na->nick);
} else {
snprintf(buf, sizeof(buf), "%-20s %s",
na->nick, na->last_usermask);