tiny
tiny copied to clipboard
Add support for /whois command
Add support for the /whois command using the raw_msg function on the connection for the particular server.
Sorry for missing this @prateeknischal. Given that it's easy to send a raw message to a server (just send the message in the server tab), I'm not sure if adding more code for simple commands like this is worth it. For the WHOIS
command you can just send WHOIS nick
in the server tab.
If we start adding commands for simple IRC commands like this, then for completeness we will probably want LIST
, RULES
, ... not sure if that's necessary.
WDYT? cc @trevarj
Not the first time this was asked for, due to the ability to autocomplete a username after /whois ...
. Therefore, I think it's ok to add. It seems that irssi supports all the commands 🤷🏻♂️
Hi @osa1 , As @trevarj mentioned, irssi supports a lot of commands and that's why I had the thought of adding it to tiny, to enhance the UX for the client. If this seems redundant, then we can close this PR :)
Note: Relates to #294
ability to autocomplete a username after /whois ....
I think this is a good idea, I'm convinced. However there's a bit of an UX issue with this implementation. If I run /whois osa1
in channel #tiny
, I get the response in the server tab. Shouldn't I see it in the same tab that I ran the command in?
get the response in the server tab
This makes sense to me, since I wouldn't want the WHOIS response to flood the chan tab, even though it is only 6-7 lines.
This makes sense to me, since I wouldn't want the WHOIS response to flood the chan tab, even though it is only 6-7 lines.
I'm not sure. If I run a command in a tab I expect the response in the same tab, unless the command creates a new tab (e.g. /msg
).
Imagine a new user trying this command. It's possible they won't even realize that the response is in the server tab.
It's possible they won't even realize that the response is in the server tab.
Ok, good point. I did not try this yet, but I would expect it to work like doing /msg chanserv help
in a chan tab --> the server tab actually tags you and the tab name highlights bold. Maybe /whois should work the same as that?
the server tab actually tags you and the tab name highlights bold. Maybe /whois should work the same as that?
Maybe. We could also automatically switch to the server tab. I'd prefer showing the response in the same tab though.
I'd prefer showing the response in the same tab though.
Ok, in that case, we need to handle the WHOIS replies to direct them to CurrentTab
:
cmd: Reply { num: 311, params: ["tester100", "trev", "~trev", "user/trev", "*", "t"] } }
cmd: Reply { num: 312, params: ["tester100", "trev", "zinc.libera.chat", "Espoo, FI"] } }
cmd: Reply { num: 671, params: ["tester100", "trev", "is using a secure connection"] } }
cmd: Reply { num: 317, params: ["tester100", "trev", "12164", "1629179930", "seconds idle, signon time"] } }
cmd: Reply { num: 330, params: ["tester100", "trev", "trev", "is logged in as"] } }
cmd: Reply { num: 318, params: ["tester100", "trev", "End of /WHOIS list."] } }