colours
authorGabriel Wicke <gwicke@users.mediawiki.org>
Wed, 14 Jul 2004 10:58:10 +0000 (10:58 +0000)
committerGabriel Wicke <gwicke@users.mediawiki.org>
Wed, 14 Jul 2004 10:58:10 +0000 (10:58 +0000)
irc/rcdumper.php

index 76ff91d..41052bc 100644 (file)
@@ -15,8 +15,6 @@ $ircServer = "irc.freenode.net";
 
 ini_set( "display_errors", 1 );
 $wgCommandLineMode = true;
-$fmB = chr(2);
-$fmU = chr(31);
 
 require_once("../maintenance/commandLine.inc" );
 
@@ -71,13 +69,10 @@ while (1) {
                        $url = $URLFirstPart . urlencode($title) .
                                "&diff=0&oldid=$lastid";
                }
-               $boldTitle = $fmB . str_replace("_", " ", $title) . $fmB;
-
-               if ( $comment !== "" ) {
-                       $comment = "($comment)";
-               }
-               
-               $fullString = "$boldTitle   $flag   $url   $user $comment\n"; 
+               $title = str_replace("_", " ", $title);
+                # see http://www.irssi.org/?page=docs&doc=formats for some colour codes. prefix is \003, 
+               # no colour (\003) switches back to the term default
+               $fullString = "\0033$title \0037$flag \00310$url \0037*\003 $user \0037*\003 $comment\n";
 
                if ( $fullString{0} == "/" ) {
                        $fullString = " $fullString";