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

All users should have private channels listed separately like what opers see in /whois #969

Closed
justdave opened this issue Jan 20, 2015 · 7 comments

Comments

@justdave
Copy link

When an oper does a /whois on a user, they get the list of channels that user is on separated into two blocks, the second of which contains channels which are private or secret, and is preceded by:

: is on private/secret channels:

When you do a /whois on yourself, or on someone else and you're not an oper, you see all of those channels mixed together, whether they are private or not.

I've seen said by several users recently that it would be convenient to know at a glance which channels they are on that are private. I think it would be useful to list the channels this same way for all users and not just opers. Of course, still preserving that you only see channels listed that you can actually see (like you don't get any private channels that another user is on unless you are also on that channel, but it still shows up in the private list if you are on that channel with them).

@HelixSpiral
Copy link
Contributor

There was an ircd that prefixes the secret channels with a ?, but I can't remember which ircd it was or if it still does so. There'd be less potential for breaking a client if we did something like that.

@justdave
Copy link
Author

That was unrealircd, we used to run that before we switched to inspircd :-)

@SadieCat
Copy link
Member

@shawn-smith That would break clients unless you listed ? in PREFIX which wouldn't make sense as it isn't a prefix mode.

@justdave I agree with this proposal, and it shouldn't be that hard to implement. Probably this (for master):

diff --git a/src/coremods/core_whois.cpp b/src/coremods/core_whois.cpp
index 966c4a7..8d80641 100644
--- a/src/coremods/core_whois.cpp
+++ b/src/coremods/core_whois.cpp
@@ -114,7 +114,7 @@ void CommandWhois::DoWhois(User* user, User* dest, unsigned long signon, unsigne
    }

    std::string cl = ChannelList(user, dest, false);
-   const ServerConfig::OperSpyWhoisState state = user->HasPrivPermission("users/auspex") ? ServerInstance->Config->OperSpyWhois : ServerConfig::SPYWHOIS_NONE;
+   const ServerConfig::OperSpyWhoisState state = user == dest || user->HasPrivPermission("users/auspex") ? ServerInstance->Config->OperSpyWhois : ServerConfig::SPYWHOIS_NONE;

    if (state == ServerConfig::SPYWHOIS_SINGLEMSG)
        cl.append(ChannelList(user, dest, true));

@HelixSpiral
Copy link
Contributor

It wouldn't break clients because clients don't do anything with the list from a whois, they just return it to the user. I never had any issue on unrealircd with any client I've used.

@Mikaela
Copy link

Mikaela commented Jan 21, 2015

👍 to the original comment and if prefix support was needed, that wouldn't work, because multiple clients hardcode those including irssi irssi/irssi#93.

@SadieCat
Copy link
Member

@shawn-smith That's an incorrect assumption. The client I use (Linkinus) strips the prefixes from the WHOIS results.

Raw -  :zoidberg.chatspike.net 319 SaberUK SaberUK :@#inspircd.dev %#inspircd %#coding
Formatted -  SaberUK is on #inspircd.dev, #inspircd, #coding

@HelixSpiral
Copy link
Contributor

I was re-reading the original post, and apparently I misread it. I didn't realize we already split them into two lines. Guess it doesn't break any clients. Disregard what I said earlier.

B00mX0r added a commit to B00mX0r/inspircd that referenced this issue Dec 21, 2017
B00mX0r added a commit to B00mX0r/inspircd that referenced this issue Dec 21, 2017
B00mX0r added a commit to B00mX0r/inspircd that referenced this issue Dec 21, 2017
SadieCat pushed a commit to B00mX0r/inspircd that referenced this issue Mar 22, 2018
SadieCat pushed a commit that referenced this issue Mar 25, 2018
Separate secret and private channels on WHOIS for all users.

- Move the config parsing from the core to core_whois.
- Replace <security:operspywhois> with an oper privilege.
- Introduce <options:splitwhois> to split WHOIS channel lists.

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

No branches or pull requests

4 participants