fix remote queue output
[xmlrtorrent.git] / xmlrtorrent.pl
index 7adc01f..c5ff36b 100644 (file)
@@ -97,7 +97,7 @@ sub write_irssi {
     my $format = '%%mxmlrtorrent: %%n' . shift(@text);
 
     # escape % in parameters from irssi
-    @text = grep { s/%/%%/g } @text;
+    s/%/%%/g foreach @text;
 
     if (defined($output) and ref($output)) {
         $output->print(sprintf($format, @text), MSGLEVEL_CLIENTCRAP);
@@ -221,6 +221,7 @@ sub cmd_remote {
                            $_->{'NAME'},
                            $_->{'BYTES_DONE'},
                            $_->{'SIZE_BYTES'},
+                           $_->{'BYTES_DONE'}*100/$_->{'SIZE_BYTES'},
                            $_->{'UP_RATE'},
                            $_->{'DOWN_RATE'});
             }