1
0
Fork 0
mirror of https://github.com/perlbot/perlbuut synced 2025-06-09 12:25:40 -04:00

bad cooks did this

This commit is contained in:
Ryan Voots 2011-01-31 21:55:02 -05:00
parent 1a7777fa23
commit b787dcaac7

View file

@ -27,6 +27,7 @@ sub command {
sub compose {
my($said, $pm) = @_;
my $str = $said->{body};
$said->{recursion} = 10 unless defined $said->{recursion};
$str =~ /\A\s*((\S).*(\S))\s*\z/s or
return "Error: empty expression for compose";
@ -100,6 +101,9 @@ sub runplugin {
$captured and local $said->{captured} = 1;
# but things called on top-level of compose are captured only if the compose itself is captured
$said->{recursion} = $said->{recursion}-1; # recurse things
if( $said->{recursion} == 0) { return( 0, "Deep recursion on $cmd" ); }
local $@;
my( $status, $results ) = eval { $plugin->command( $said, $pm ) };