summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes1
-rw-r--r--src/core/ns_list.c12
-rw-r--r--version.log6
3 files changed, 17 insertions, 2 deletions
diff --git a/Changes b/Changes
index a6dca3983..47c127469 100644
--- a/Changes
+++ b/Changes
@@ -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.