You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Channel mode to block IRC formatting codes (+c) #122
Add a channel mode that lets channel operators keep IRC formatting codes out of a channel's messages. Many servers offer this as +c.
Background
IRC formatting is done with C0 control characters in message text:
\x02 bold
\x03 color, for example \x0304,01
\x04 hex color
\x0F reset
\x11 monospace
\x16 reverse
\x1D italic
\x1E strikethrough
\x1F underline
jircd delivers these unchanged today, and channels have no way to restrict them. The core channel modes are b e I i m n p s o v l k t. There is no formatting mode, and channel modes can also come from extensions (ExtensionRegistry.recognizedChannelModes).
Proposal
A boolean channel mode +c, settable by channel operators. While it is set, a PRIVMSG or NOTICE to the channel that contains formatting codes is rejected with 404 ERR_CANNOTSENDTOCHAN, and it is not delivered to anyone.
It is advertised in CHANMODES (type D) and in 004, like the other boolean modes.
It is delivered as a module through the existing extension mechanism, following the capability-plugin intent, so it stays out of core.
Open questions (settle in the spec)
Block or strip? Some servers block with +c and offer a separate mode, often +S, that strips the codes and delivers the cleaned text. Do we want one of these or both?
Which codes? Colors only (\x03, \x04), or all formatting codes?
CTCP:\x01 framing, such as ACTION, must keep working. Does a /me that contains colors count?
Other text: do TOPIC, PART and KICK reasons in a +c channel follow the same rule, or only messages?
Exemptions: are operators and voiced members exempt?
Out of scope
Formatting codes in identifiers. #121 rejects control characters in USER idents.
Activity