From 48fbd51151a9bf474900a6eba172ee23619c9497 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 19 Jun 2022 21:40:25 +0100 Subject: [PATCH] Add support for escaping hex colour codes This is not widely supported but we should have an escape regardless. --- docs/conf/inspircd.conf.example | 1 + src/helperfuncs.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/conf/inspircd.conf.example b/docs/conf/inspircd.conf.example index bd5a6050f..b100a212f 100644 --- a/docs/conf/inspircd.conf.example +++ b/docs/conf/inspircd.conf.example @@ -366,6 +366,7 @@ # used in your MOTD: # Bold: \b # Color: \c[,] + # Hex Color: \h[,] # Italic: \i # Monospace: \m (not widely supported) # Reset: \x diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 74c72e744..28ed4128c 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -158,6 +158,7 @@ void InspIRCd::ProcessColors(file_cache& input) } special[] = { special_chars("\\b", "\x02"), // Bold special_chars("\\c", "\x03"), // Color + special_chars("\\h", "\x04"), // Hex Color special_chars("\\i", "\x1D"), // Italic special_chars("\\m", "\x11"), // Monospace special_chars("\\r", "\x16"), // Reverse