summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-11-10 15:40:47 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-11-10 15:40:47 +0000
commitcd3ff41f3e59bf6955abf339426672ec14bb6194 (patch)
treedd3f8245f462b4028cb7bf9939d972bbd684cb2d
parent902280eca78875a82619770cc94afe88ae418a8c (diff)
downloadirssi-cd3ff41f3e59bf6955abf339426672ec14bb6194.zip
Updated from scripts.irssi.org
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2993 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r--scripts/scriptassist.pl14
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/scriptassist.pl b/scripts/scriptassist.pl
index b62bbe52..f4cecbea 100644
--- a/scripts/scriptassist.pl
+++ b/scripts/scriptassist.pl
@@ -6,7 +6,7 @@
use strict;
use vars qw($VERSION %IRSSI);
-$VERSION = '2002110401';
+$VERSION = '2002111001';
%IRSSI = (
authors => 'Stefan \'tommie\' Tomanek',
contact => 'stefan@pico.ruhr.de',
@@ -434,19 +434,25 @@ sub array2table {
my @width;
foreach my $line (@array) {
for (0..scalar(@$line)) {
- $width[$_] = length($line->[$_]) if $width[$_]<length($line->[$_]);
+ my $l = $line->[$_];
+ $l =~ s/%[^%]//g;
+ $l =~ s/%%/%/g;
+ $width[$_] = length($l) if $width[$_]<length($l);
}
}
my $text;
foreach my $line (@array) {
for (0..scalar(@$line)) {
+ my $l = $line->[$_];
$text .= $line->[$_];
- $text .= " "x($width[$_]-length($line->[$_])+1);
+ $l =~ s/%[^%]//g;
+ $l =~ s/%%/%/g;
+ $text .= " "x($width[$_]-length($l)+1);
}
$text .= "\n";
}
return $text;
-}
+}
sub print_info (%) {