1.6.1 - r339 - Fix DM formatting
[twirssi-net-twitter-lite.git] / twirssi.pl
index 8f7f966cd42fa7326cd4b5e4a664b092900208c9..547d1d98e3d794313452e6705cd48851bb7169cc 100644 (file)
@@ -12,7 +12,7 @@ $Data::Dumper::Indent = 1;
 use vars qw($VERSION %IRSSI);
 
 $VERSION = "1.6.1";
-my ($REV) = '$Rev: 336 $' =~ /(\d+)/;
+my ($REV) = '$Rev: 339 $' =~ /(\d+)/;
 %IRSSI = (
     authors     => 'Dan Boger',
     contact     => 'zigdon@gmail.com',
@@ -651,8 +651,8 @@ sub do_updates {
     };
 
     if ($@) {
-        printf $fh "type:error Error during friends_timeline call.  Aborted.\n"
-          return;
+        print $fh "type:error Error during friends_timeline call.  Aborted.\n";
+        return;
     }
 
     foreach my $t ( reverse @$tweets ) {
@@ -691,10 +691,11 @@ sub do_updates {
     eval {
         $tweets = $obj->replies( { since => HTTP::Date::time2str($last_poll) } )
           || [];
-      }
+    };
 
-      if ($@) {
-        printf $fh "type:error Error during replies call.  Aborted.\n" return;
+    if ($@) {
+        print $fh "type:error Error during replies call.  Aborted.\n";
+        return;
     }
 
     foreach my $t ( reverse @$tweets ) {
@@ -763,7 +764,7 @@ sub monitor_child {
             } elsif ( $meta{type} eq 'reply' ) {
                 push @lines, "[$account\\--> %B\@$meta{nick}%n$marker] $_\n",;
             } elsif ( $meta{type} eq 'dm' ) {
-                push @lines, "[$account%B\@$meta{nick}%n (%%WDM%%n)] $_\n",;
+                push @lines, "[$account%B\@$meta{nick}%n (%WDM%n)] $_\n",;
             } elsif ( $meta{type} eq 'error' ) {
                 push @lines, "debug: $_\n" if &debug,;
             } elsif ( $meta{type} eq 'debug' ) {