fix text formatting (use ^O to end color coding), fixes blue accidentally flowing...
authorBrian S. Stephan <bss@emptymatter.org>
Wed, 21 Jan 2009 01:54:28 +0000 (19:54 -0600)
committerBrian S. Stephan <bss@emptymatter.org>
Wed, 21 Jan 2009 01:54:28 +0000 (19:54 -0600)
twirssi.pl

index f43b20363a1ebeb73ef791f179edaf9d29294325..8a1f33ca7eb489a18b43e9d05fa4a257538b80c5 100644 (file)
@@ -611,7 +611,7 @@ sub do_updates {
 
     foreach my $t ( reverse @$tweets ) {
         my $text = decode_entities( $t->{text} );
-        $text =~ s/(^|\W)\@([-\w]+)/$1\cC12\@$2\cC/g;
+        $text =~ s/(^|\W)\@([-\w]+)/$1\cC12\@$2\cO/g;
         $text =~ s/[\n\r]/ /g;
         my $reply = "tweet";
         if (    Irssi::settings_get_bool("show_reply_context")
@@ -627,7 +627,7 @@ sub do_updates {
 
             if ($context) {
                 my $ctext = decode_entities( $context->{text} );
-                $ctext =~ s/(^|\W)\@([-\w]+)/$1\cC12\@$2\cC/g;
+                $ctext =~ s/(^|\W)\@([-\w]+)/$1\cC12\@$2\cO/g;
                 $ctext =~ s/[\n\r]/ /g;
                 printf $fh "id:%d account:%s nick:%s type:tweet %s\n",
                   $context->{id}, $username,
@@ -664,7 +664,7 @@ sub do_updates {
           if exists $friends{ $t->{user}{screen_name} };
 
         my $text = decode_entities( $t->{text} );
-        $text =~ s/(^|\W)\@([-\w]+)/$1\cC12\@$2\cC/g;
+        $text =~ s/(^|\W)\@([-\w]+)/$1\cC12\@$2\cO/g;
         $text =~ s/[\n\r]/ /g;
         printf $fh "id:%d account:%s nick:%s type:tweet %s\n",
           $t->{id}, $username, $t->{user}{screen_name}, $text;
@@ -684,7 +684,7 @@ sub do_updates {
 
     foreach my $t ( reverse @$tweets ) {
         my $text = decode_entities( $t->{text} );
-        $text =~ s/(^|\W)\@([-\w]+)/$1\cC12\@$2\cC/g;
+        $text =~ s/(^|\W)\@([-\w]+)/$1\cC12\@$2\cO/g;
         $text =~ s/[\n\r]/ /g;
         printf $fh "id:%d account:%s nick:%s type:dm %s\n",
           $t->{id}, $username, $t->{sender_screen_name}, $text;