From 4633665ad62bdfe26529dfc115b1ba311903ed01 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Mon, 10 Jun 2024 20:31:51 +0000 Subject: [PATCH] Fix WHOIS reply not respecting a lack of the multi-prefix capability Prior to this commit, RPL_WHOISCHANNELS always contained all channel membership prefixes, even when the client had not enabled the multi-prefix capability. This behaviour predates available commit history. Other ircds only return the highest prefix, as prescribed by the RFCs. --- modules/m_whois.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/m_whois.c b/modules/m_whois.c index bb37a5ba..ea94e1db 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -279,7 +279,7 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy) { send_multiline_item(source_p, "%s%s%s", hdata_vis.approved ? "" : "!", - find_channel_status(mt, 1), + find_channel_status(mt, IsCapable(source_p, CLICAP_MULTI_PREFIX)), chptr->chname); } }