From: Michael Poole Date: Sun, 20 May 2007 14:10:30 +0000 (+0000) Subject: Fix SF#1704419 by properly hiding hidden ports. X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=commitdiff_plain;h=3c98d2be97bdd221a17cdbd55a1ad1bfc82481ca Fix SF#1704419 by properly hiding hidden ports. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1809 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- diff --git a/ChangeLog b/ChangeLog index 4026a69..52f1076 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-05-20 Michael Poole + + * ircd/listener.c (show_ports): Actually hide hidden ports from + clients that should not see them. + 2007-05-20 Michael Poole * ircd/s_err.c (ERR_DONTCHEAT): Add apparently missing %s. diff --git a/ircd/listener.c b/ircd/listener.c index ee6bcc2..a3c9e93 100644 --- a/ircd/listener.c +++ b/ircd/listener.c @@ -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';