Conversation
|
This looks great. I'll leave it open a little longer before merging. |
|
@ajaspers points out that this should prevent receiving CTCP messages, not sending them. |
|
Sending CTCPs should indeed still be possible if the user has +T also what an optional oper-override option? Either just a config option or an oper priv? It might be useful for opers to know what client and version a user has (regarding the client parsing issue Insp 3 has revealed for example). |
|
I think I'm uncomfortable with this as an operator privilege. (It also presents a UI problem: normally we make operators exercise their privileges explicitly, e.g., with |
irc/handlers.go
Outdated
|
|
||
| if rb.session.isTor && utils.IsRestrictedCTCPMessage(message) { | ||
| isCTCP := utils.IsRestrictedCTCPMessage(message) | ||
| if isCTCP && client.modes.HasMode(modes.UserNoCTCP) { |
There was a problem hiding this comment.
This is still checking the mode on the sender, not the recipient?
|
This looks pretty good. Could you:
|
irc/handlers.go
Outdated
| } | ||
|
|
||
| // Restrict CTCP message for target user with +T | ||
| if message.IsRestrictedCTCPMessage() && user.modes.HasMode(modes.UserNoCTCP) { |
There was a problem hiding this comment.
Optional performance-related feedback: either reverse the order of these checks, or cache the result of IsRestrictedCTCPMessage for use lower down with Tor sessions.
2a7435f to
14cb8fc
Compare
|
Squashed and removed the unused numeric. |
14cb8fc to
fca2900
Compare
|
Ok I reversed those checks as well, all squashed again |
Adds no-CTCP usermode as per #1007