Skip to content

Make WHO behaviour closer to RFC

Julio González Gil requested to merge juliogonzalez/irc-bridge:ownwho into develop

Reason

WHO is used by some clients (such as Konversation) to check if the hostmask is changed (this happens when enabling/disabling cloacks for example at Freenode).

With the current code, the user gets an invalid WHO reply, and in Konversation case this means:

image

Each 60 seconds

Fix

This fix improves the WHO command in several ways:

When no parameters are passed, return an error: image

When the user looks for himself, return information about himself: image

When the user looks for another user, or for a channel that do not exist, return an empty list: image

TO-DO

Ideally at some point a real WHO could be implemented, but that's a more complicated PR as it would require handling masks, etc.

Still, a simple approach, that could also be valid for WHOIS could be:

  1. Look if the user exists at all.
  2. Look for the common channels before the users (the one making the request the queries at WHO/WHOIS.
  3. For WHO: return the information and the first common channel
  4. For WHOIS: return the information and all common channels. As I guess we don't have IDLE or ONLINE information, those could just be set to 0sec.
Edited by 🤖 GitLab Bot 🤖

Merge request reports