-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
whowas swallows older replies #371
Comments
Just in case it isn't obvious, I'd be happy to write the patch after you tell me which option you prefer. |
I think at a minimum whowas should give the most recent, but instead of another event for it what about adding an array of previous entries to the same event? That way it will still be backwards compatible but contain the extra info for anyone wanting to use it. |
it's certainly an option but slightly akward as any client that just wants to show all of them needs to process the main event first, then loop over the "older" (however that's then named) array and do the same rendering logic there. |
Whowas results are a list of all known RPL_WHOWASUSER replies. Return the most recent event as the top level and add the rest to a `historical` field as an array. Example: ``` :inspircd.server.example 314 val someone ident3 127.0.0.1 * :Realname :inspircd.server.example 312 val someone My.Little.Server :Sun Mar 20 2022 10:59:26 :inspircd.server.example 314 val someone ident2 127.0.0.1 * :Realname :inspircd.server.example 312 val someone My.Little.Server :Sun Mar 20 2022 10:59:16 :inspircd.server.example 314 val someone ident1 127.0.0.1 * :Realname :inspircd.server.example 312 val someone My.Little.Server :Sun Mar 19 2022 9:23:06 :inspircd.server.example 369 val someone :End of WHOWAS whowas { nick: 'someone', ident: 'ident3', hostname: '127.0.0.1', real_name: 'Realname', server: 'My.Little.Server', server_info: 'Sun Mar 20 2022 10:59:26', historical: [ { nick: 'someone', ident: 'ident2', hostname: '127.0.0.1', real_name: 'Realname', server: 'My.Little.Server', server_info: 'Sun Mar 20 2022 10:59:16' }, { nick: 'someone', ident: 'ident1', hostname: '127.0.0.1', real_name: 'Realname', server: 'My.Little.Server', server_info: 'Sun Mar 19 2022 9:23:06' } ] } ``` Fixes: kiwiirc#371
Whowas is a list: https://modern.ircdocs.horse/#whowas-message
Unless the command is executed as
WHOWAS 1
, the returned data is a list of all known RPL_WHOWASUSER replies.e046036 changed the semantics from sending all replies observed to just the last.
The way the protocol works is that the first entry is the most recent, so effectively this means that on a multi reply the framework only emits the oldest, which is the least useful for most users (citation needed).
This doesn't seem intentional, there's a couple of ways of addressing this:
whowaslist
?)If this is preferred, how do you wanna treat
whowas
? Keep sending the oldest? Start sending the newest?Now, what's your preferred option there?
The text was updated successfully, but these errors were encountered: