]> jfr.im git - irc/unrealircd/unrealircd.git/commitdiff
m_message: Also strip monospace/strikethrough
authorShane Synan <redacted>
Sat, 15 Sep 2018 21:25:05 +0000 (16:25 -0500)
committerShane Synan <redacted>
Sat, 15 Sep 2018 21:25:05 +0000 (16:25 -0500)
Add the ASCII character codes for strikethrough (0x1E, 30) and
monospace (0x11, 17) to the _StripControlCodes function.  This
addresses those formatting characters not being filtered when the
"nocodes" module is loaded.

See https://modern.ircdocs.horse/formatting.html#characters

src/modules/m_message.c

index e015beaaf4850f650cc69f8f7f2c1b88717b570b..4bd6d2580b434770a8fce51bc08a6f383c9015a2 100644 (file)
@@ -839,6 +839,12 @@ char *_StripControlCodes(unsigned char *text)
                        case 29:
                                /* italic */
                                break;
+                       case 30:
+                               /* strikethrough */
+                               break;
+                       case 17:
+                               /* monospace */
+                               break;
                        default:
                                new_str[i] = *text;
                                i++;