-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Up until now IRC formatting hasn't been extensible: adding a new formatting code will break existing clients, because existing clients will not be able to understand how to strip the unknown formatting codes in the message. This is a proposal for an extensible, backwards-compatible formatting code.
Use-cases include custom emoji, attachments, links, and so on.
A new formatting code 0x10 is introduced. A new extended-formatting
cap can be negotiated by the client. If enabled, the server can pass through 0x10 codes. Otherwise, the server strips 0x10 codes. The 0x10 code is defined with a format name, key-value pairs, and a text. The text can always be used as a fallback. That is, if the format name is unknown, the whole 0x10 can be striped and replaced with the fallback text.
0x10 <name> " " <key-values> ";" <text> 0x10
Example, with F for 0x10:
PRIVMSG #ircv3 hi Fcustom-emoji;:gopher:F
On clients not supporting extended-formatting
, the server would strip the formatting and send hi :gopher:
. On clients supporting extended-formatting
but not the custom-emoji
format, the server would send the message as-is but the client would use the text as a fallback and display it as-is. On clients supporting extended-formatting
and the custom-emoji
format, the client would display the custom emoji.