summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2023-08-03 10:57:27 +0200
committerAlexander Barton <alex@barton.de>2023-08-03 10:57:27 +0200
commit335ae4f0d098d8fccc571ee0b8f37dba6df06ec8 (patch)
treeba1dfb2e0bb1ec8427a18de72d5c222c1f340ba0 /src
parent63ad3b9acd1e461a669d31de50ff5c3eabaefc85 (diff)
downloadngircd-335ae4f0d098d8fccc571ee0b8f37dba6df06ec8.tar.gz
ngircd-335ae4f0d098d8fccc571ee0b8f37dba6df06ec8.zip
Hide +i users on "WHOIS <pattern>"
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!
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/irc-info.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c
index 03127b22..718aa990 100644
--- a/src/ngircd/irc-info.c
+++ b/src/ngircd/irc-info.c
@@ -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))