Repository navigation
Add WHOIS privacy user mode +p - #267
Jazzzzz-hub wants to merge 2 commits into
Conversation
New User Mode
This is separate from the existing channel mode The existing uppercase user mode ImplementationThe patch:
Access Behaviour
TestingTested on a standalone Bahamut 2.2.4 server. Verified:
Implementation Note
The implementation has been tested on a 64-bit build where Review from the SRC team would be appreciated regarding portability expectations on platforms where the width or signedness of |
|
Thanks for this. I built it and tested it on a local 3-server network. WHOIS works as described: normal users, on the same server or a remote one, and including Required changes
Design: matching other ircds
|
| UMODE_I, 'I', | ||
| #ifdef SPAMFILTER | ||
| UMODE_P, 'P', | ||
| UMODE_p, 'p', |
There was a problem hiding this comment.
This is inside #ifdef SPAMFILTER. Builds without SPAMFILTER would have UMODE_p in USER_UMODES but no entry in this table, so MODE nick +p couldn't be set or sent to other servers. Please move it below the #endif.
| #endif | ||
| mlen = strlen(me.name) + strlen(parv[0]) + 9 + strlen(name); | ||
| for (len = 0, *buf = '\0', lp = user->channel; lp; lp = lp->next) | ||
| if (!IsUmodep(acptr) || IsAnOper(sptr) || sptr == acptr) |
There was a problem hiding this comment.
The indentation here is off (16 spaces), and the loop below was re-wrapped even though its logic didn't change. Could you keep the original loop and add only this guard? Also, other ircds with this mode still show channels the requester shares with the target. Consider moving the check inside the loop as something like if (IsUmodep(acptr) && !IsAnOper(sptr) && sptr != acptr && !IsMember(sptr, chptr)) continue;.
10f5727 to
28092fc
Compare
|
Updated the PR based on the review feedback. Changes made:
Runtime testing completed:
The branch now contains a single clean +p commit on top of #271. |
|
@eaescob Just following up on this PR. The requested review fixes have been applied and tested, and the branch was rebased on the merged user-mode bitmask changes. From our earlier discussion, I believe the remaining question is the design choice around +p whether it should continue hiding both non-shared WHOIS channels and idle/sign-on information, or whether idle privacy should be split into a separate user mode. I have left the current implementation as one +p mode for now and documented its behaviour clearly. When you get a chance, please let me know which direction you prefer, or if there is anything else you would like changed in #267. -Jazzzzz |
Summary
This pull request adds a new user mode,
+p, to provide optional WHOIS privacy.When
+pis enabled, selected WHOIS information is hidden from normal users while remaining visible to IRC operators and to the user performing a WHOIS on themselves.Behaviour
When the WHOIS target has
+penabled:RPL_WHOISCHANNELS(319) is hidden from normal users.RPL_WHOISIDLE(317) is hidden from normal users.A new WHOIS reply is also added:
320 RPL_WHOISPRIVACYExample: