mirror of
https://github.com/perlbot/perlbuut
synced 2025-06-07 18:45:42 -04:00
Make evallall a little nicer
This commit is contained in:
parent
2ccaad88d2
commit
cc66522cc4
1 changed files with 2 additions and 2 deletions
|
@ -84,14 +84,14 @@ sub command {
|
||||||
# TODO use channel config for this
|
# TODO use channel config for this
|
||||||
if ($said->{channel} eq '#perlbot' || $said->{channel} eq '*irc_msg') {
|
if ($said->{channel} eq '#perlbot' || $said->{channel} eq '*irc_msg') {
|
||||||
for my $version (@versions) {
|
for my $version (@versions) {
|
||||||
my $torun = $version eq '' ? 'blead' : $version;
|
my $torun = $version eq '' ? 'blead' : sprintf "%5s", $version;
|
||||||
next if $version eq 'all';
|
next if $version eq 'all';
|
||||||
next if $version eq '4';
|
next if $version eq '4';
|
||||||
next if $version eq '5.5' && $command =~ /w/; # no warnings in 5.5
|
next if $version eq '5.5' && $command =~ /w/; # no warnings in 5.5
|
||||||
|
|
||||||
push @outs, "[[$torun]]", $self->do_eval('perl'.$version, $code);
|
push @outs, "[[$torun]]", $self->do_eval('perl'.$version, $code);
|
||||||
}
|
}
|
||||||
$resultstr = join " ", @outs;
|
$resultstr = join "\n", @outs;
|
||||||
} else {
|
} else {
|
||||||
$resultstr = "evalall only works in /msg or in #perlbot";
|
$resultstr = "evalall only works in /msg or in #perlbot";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue