johnmaguire / Cardinal

A Python IRC bot, designed to make adding functionality quick and simple. (est. 2013)
MIT License
100 stars 38 forks source link

seen plugin should not send control codes in messages if +c is set on the channel #182

Closed johnmaguire closed 3 years ago

johnmaguire commented 3 years ago

Currently, we send the last message we saw from a user in quotes. Since the message may contain control codes, we send the "clear formatting" control code just before the close quote.

However - channels with +c set on them block messages with formatting codes. Whether the message originally contained control codes or not, we should strip them, and not send our "clear formatting" code at the end of the message.

johnmaguire commented 3 years ago

As an aside, we should probably only send the clear-formatting code if it's truly necessary.