Skip to content
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

Add support for /whois command #337

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

prateeknischal
Copy link

Add support for the /whois command using the raw_msg function on the
connection for the particular server.

Add support for the /whois command using the raw_msg function on the
connection for the particular server.
@osa1
Copy link
Owner

osa1 commented Aug 6, 2021

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

@trevarj
Copy link
Contributor

trevarj commented Aug 6, 2021

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 🤷🏻‍♂️

@prateeknischal
Copy link
Author

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 :)

@trevarj
Copy link
Contributor

trevarj commented Aug 13, 2021

Note: Relates to #294

@osa1
Copy link
Owner

osa1 commented Aug 17, 2021

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?

@trevarj
Copy link
Contributor

trevarj commented Aug 17, 2021

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.

@osa1
Copy link
Owner

osa1 commented Aug 17, 2021

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.

@trevarj
Copy link
Contributor

trevarj commented Aug 17, 2021

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?

@osa1
Copy link
Owner

osa1 commented Aug 17, 2021

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.

@trevarj
Copy link
Contributor

trevarj commented Aug 17, 2021

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."] } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants