git://git.camperquake.de
/
xmlrtorrent.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4e9ffeb
)
escape % in irssi messages
author
Christian Garbs
<mitch@cgarbs.de>
Sun, 28 Dec 2008 11:52:13 +0000
(12:52 +0100)
committer
Ralf Ertzinger
<sun@lain.camperquake.de>
Sun, 28 Dec 2008 21:22:40 +0000
(22:22 +0100)
xmlrtorrent.pl
patch
|
blob
|
history
diff --git
a/xmlrtorrent.pl
b/xmlrtorrent.pl
index
3514100
..
7adc01f
100644
(file)
--- a/
xmlrtorrent.pl
+++ b/
xmlrtorrent.pl
@@
-94,12
+94,15
@@
sub write_irssi {
my @text = @_;
my $output = $outputstack[0];
my @text = @_;
my $output = $outputstack[0];
- $text[0] = '%%mxmlrtorrent: %%n' . $text[0];
+ my $format = '%%mxmlrtorrent: %%n' . shift(@text);
+
+ # escape % in parameters from irssi
+ @text = grep { s/%/%%/g } @text;
if (defined($output) and ref($output)) {
if (defined($output) and ref($output)) {
- $output->print(sprintf(
shift(@text)
, @text), MSGLEVEL_CLIENTCRAP);
+ $output->print(sprintf(
$format
, @text), MSGLEVEL_CLIENTCRAP);
} else {
} else {
- Irssi::print(sprintf(
shift(@text)
, @text));
+ Irssi::print(sprintf(
$format
, @text));
}
}
}
}