Fix SF#1704419 by properly hiding hidden ports.
authorMichael Poole <mdpoole@troilus.org>
Sun, 20 May 2007 14:10:30 +0000 (14:10 +0000)
committerMichael Poole <mdpoole@troilus.org>
Sun, 20 May 2007 14:10:30 +0000 (14:10 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1809 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/listener.c

index 4026a69dc0bb52c204748e485189ac5cfb50cb52..52f1076248f4241f53bc1d0fa51e48c3816fbff8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-20  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/listener.c (show_ports): Actually hide hidden ports from
+       clients that should not see them.
+
 2007-05-20  Michael Poole <mdpoole@troilus.org>
 
        * ircd/s_err.c (ERR_DONTCHEAT): Add apparently missing %s.
index ee6bcc2bd6a6bd55fdfa6a6fb8d30dcb09e673ae..a3c9e93785e2fd3ce4a302c3a3ca99323e9d8d94 100644 (file)
@@ -147,8 +147,12 @@ void show_ports(struct Client* sptr, const struct StatDesc* sd,
       continue;
     len = 0;
     flags[len++] = listener_server(listener) ? 'S' : 'C';
-    if (show_hidden && FlagHas(&listener->flags, LISTEN_HIDDEN))
+    if (FlagHas(&listener->flags, LISTEN_HIDDEN))
+    {
+      if (!show_hidden)
+        continue;
       flags[len++] = 'H';
+    }
     if (FlagHas(&listener->flags, LISTEN_IPV4))
     {
       flags[len++] = '4';