From: Rick Gibbed Date: Tue, 9 Oct 2012 01:19:58 +0000 (-0400) Subject: Reinstate mIRC codes in a form that won't eat following text. X-Git-Tag: 1.10~6 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=e0c937bf8f58dbd0f0e52b956e05a51e4dc265a8;p=irker.git Reinstate mIRC codes in a form that won't eat following text. Signed-off-by: Eric S. Raymond --- diff --git a/irkerhook.py b/irkerhook.py index fa67af6..b7bc1de 100755 --- a/irkerhook.py +++ b/irkerhook.py @@ -108,6 +108,17 @@ class GenericExtractor: self.brown = self.magenta = self.cyan = self.reset = "" def activate_color(self, style): "IRC color codes." + if style == 'mIRC': + # mIRC colors are mapped as closely to the ANSI colors as possible. + self.bold = '\x02' + self.green = '\x0309' + self.blue = '\x0312' + self.red = '\x0304' + self.yellow = '\x0308' + self.brown = '\x0305' + self.magenta = '\x0306' + self.cyan = '\x0310' + self.reset = '\x0F' if style == 'ANSI': self.bold = '\x1b[1m' self.green = '\x1b[1;32m' diff --git a/irkerhook.xml b/irkerhook.xml index f031c72..d097aaa 100644 --- a/irkerhook.xml +++ b/irkerhook.xml @@ -119,7 +119,8 @@ variable is "None", no compression will be attempted. color -If "ANSI", highlight notification fields with ANSI color escape sequences. +If "mIRC", highlight notification fields with mIRC color codes. +If "ANSI", highlight notification fields with ANSI color escape sequences. Defaults to "none" (no colors). Note: if you turn this on and notifications stop appearing on your channel, you need to turn off IRC's color filter on that channel. To do this you will need op