Reinstate mIRC codes in a form that won't eat following text.
authorRick Gibbed <gibbed@gitorious.org>
Tue, 9 Oct 2012 01:19:58 +0000 (21:19 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 9 Oct 2012 01:19:58 +0000 (21:19 -0400)
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
irkerhook.py
irkerhook.xml

index fa67af6a310cf2fe4dc73e3b1414af254592bf96..b7bc1de58272458e519bb28f93bfd9f1a1e669f7 100755 (executable)
@@ -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'
index f031c722f0b727745097aa5f531bc7cf3f1a2710..d097aaaeb442d33a808073116b933483b64d56a2 100644 (file)
@@ -119,7 +119,8 @@ variable is "None", no compression will be attempted.</para>
 <varlistentry>
 <term>color</term>
 <listitem>
-<para>If "ANSI", highlight notification fields with ANSI color escape sequences.
+<para>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