diff options
author | drstein 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 |
---|---|---|
committer | drstein 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 |
commit | 1a3f71be6037bb70a8027f7904fff8cea2d2e979 (patch) | |
tree | 5c4fe14fe9f6c9f4342fede5b8edbf6d89781f1b | |
parent | 62de724353408bcf0c6aa889f4f03615c466b60e (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
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | src/core/ns_list.c | 12 | ||||
-rw-r--r-- | version.log | 6 |
3 files changed, 17 insertions, 2 deletions
@@ -38,6 +38,7 @@ Anope Version S V N 02/11 F Added missed debug message when HostServ is disabled. [#863] 02/12 F rdb_close() where rdb_open() is used in rdb_dbase() functions. [#862] 02/12 F Removed extra loop when parsing defcon modes. [#867] +02/12 A Added SUSPENDED to NS LIST keywords. [#869] Provided by Trystan <trystan@nomadirc.net> - 2008 02/11 F Last part of memory leak in cs_akick() [#870] 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); diff --git a/version.log b/version.log index f7ff72ce2..e6a4b7000 100644 --- a/version.log +++ b/version.log @@ -9,10 +9,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="21" VERSION_EXTRA="-svn" -VERSION_BUILD="1386" +VERSION_BUILD="1387" # $Log$ # +# BUILD : 1.7.21 (1387) +# BUGS : 869 +# NOTES : Added SUSPENDED to NS LIST keywords. +# # BUILD : 1.7.21 (1386) # BUGS : 867 # NOTES : Removed extra loop when parsing defcon modes. |