fix % escaping
[xmlrtorrent.git] / xmlrtorrent.pl
index 7adc01f..c2d823c 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);