creesch / discordIRCd

A node.js script that allows you to connect to discord with your irc client.
Apache License 2.0
115 stars 21 forks source link

Fix Unknown CTCP when the start of a message, but not the entire message, is in italics #49

Closed Pokechu22 closed 5 years ago

Pokechu22 commented 5 years ago

Before, a message from discord such as _Probably_ the former would be incorrectly detected as a /me-type message, producing broken output when the replacement was done (https://i.imgur.com/RW7r1qL.png). Now, /me detection requires the whole message to be in italics.

The conversion is still rather lazy and fails in some edge cases (e.g. multiline /me), but discord's implementation of /me is also rather lazy (it fails when there's an underscore in the message) so it doesn't really matter. This at least produces sane output.