Skip to content

Commit

Permalink
Revert "Fix WHOIS reply not respecting a lack of the multi-prefix cap…
Browse files Browse the repository at this point in the history
…ability"

A server handling a remote WHOIS cannot safely use IsCapable() to determine
if the client has multi-prefix enabled or not.

This is because client capabilities are not shared between servers; and the
IsCapable() macro dereferences source_p->localClient which will be NULL if
source_p is not on this server.

Instead rework the commit to always pretend that multi-prefix is not
enabled, to still respect the fact that multiple prefixes should not be
returned in case a client does not have multi-prefix enabled.

This reverts commit 4633665
  • Loading branch information
aaronmdjones committed Jun 11, 2024
1 parent 4633665 commit 746ced2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/m_whois.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, IsCapable(source_p, CLICAP_MULTI_PREFIX)),
find_channel_status(mt, 0),
chptr->chname);
}
}
Expand Down

0 comments on commit 746ced2

Please sign in to comment.