Add support for escaping hex colour codes

This is not widely supported but we should have an escape regardless.
This commit is contained in:
Sadie Powell 2022-06-19 21:40:25 +01:00
parent 30f64f9225
commit 48fbd51151
2 changed files with 2 additions and 0 deletions

View File

@ -366,6 +366,7 @@
# used in your MOTD:
# Bold: \b
# Color: \c<fg>[,<bg>]
# Hex Color: \h<fg>[,<bg>]
# Italic: \i
# Monospace: \m (not widely supported)
# Reset: \x

View File

@ -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