]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Hide +i users on "WHOIS <pattern>"
authorAlexander Barton <alex@barton.de>
Thu, 3 Aug 2023 08:57:27 +0000 (10:57 +0200)
committerAlexander Barton <alex@barton.de>
Thu, 3 Aug 2023 08:57:27 +0000 (10:57 +0200)
Let's behave like most(?) other IRC daemons (at least ircd2.11) and hide
all +i users when WHOIS is used with a pattern. Otherwise privacy of
this users is not guaranteed and the +i mode a bit useless ...

Reported by Cahata on #ngircd, thanks!

src/ngircd/irc-info.c

index 03127b229f4008d203ce0fd700d9ca4173250043..718aa9905835ac0482cc0e74ad4643090517d558 100644 (file)
@@ -1265,6 +1265,8 @@ IRC_WHOIS( CLIENT *Client, REQUEST *Req )
 
                        if (Client_Type(c) != CLIENT_USER)
                                continue;
+                       if (Client_HasMode(c, 'i'))
+                               continue;
                        if (!MatchCaseInsensitive(query, Client_ID(c)))
                                continue;
                        if (!IRC_WHOIS_SendReply(Client, from, c))