sm00th / bitlbee-discord

Bitlbee plugin for Discord (http://discordapp.com)
GNU General Public License v2.0
291 stars 27 forks source link

Translate Discord Markdown formatting to/from IRC formatting #28

Open digitalcircuit opened 8 years ago

digitalcircuit commented 8 years ago

Most IRC clients support mIRC color codes and formatting for italics, bold, etc. For example, here's how Quassel IRC handles converting from mIRC to Qt internal.

Discord also supports formatting (minus colors) via their flavor of Markdown. Mapping mIRC to Markdown and vice-versa would help keep visual intent the same.

This should be optional, akin to the incoming_me_translation, say, incoming_format_translation, and apply to both channels and private messages (also see issue #27). Sending out mIRC codes probably should always be translated as the special characters are nonsensical to the Discord client.

Some more information on color and formatting (feel free to ignore the color aspect): http://en.wikichip.org/wiki/irc/colors https://wiki.mibbit.com/index.php/Formatting http://www.mirc.com/colors.html

Aside: the Bitlbee OTR plugin uses mIRC color and formatting codes, then strips certain color combinations and the prefix of <<OTR>> in order to ensure OTR messages cannot be spoofed. However, it's unlikely to need handled here, for even if the OTR plugin doesn't account for other plugins, Discord itself doesn't support colors.

zertap commented 7 years ago

Yes, translating incoming and outgoing bolds and italics would be a nice addition.

dgw commented 6 years ago

I don't know how long this has been the case, since I only started using bitlbee-discord last week, but I get <@root> discord - Error: Failed to send message (400). in &bitlbee when trying to send messages that contain (m)IRC formatting characters.

Outbound translation seems wise. Inbound is less important, because most of us can probably interpret the formatting characters sent by Discord through our experiences with Markdown in various applications.

digitalcircuit commented 6 years ago

Outbound translation seems wise. Inbound is less important, because most of us can probably interpret the formatting characters sent by Discord through our experiences with Markdown in various applications.

I agree on the relative importance, and if it's too much hassle to make incoming translation optional, feel free to leave it out. It'd just seem odd to do IRC format parsing at all then only parse it one way, instead of optionally both ways.