From 88136213bbb987301905c890239f22652fb7655a Mon Sep 17 00:00:00 2001 From: "ian%hixie.ch" Date: Sat, 16 Aug 2003 19:56:40 +0000 Subject: [PATCH] labels can only go on blocks, not if statements, apparently. fixes bug 139646 --- webtools/mozbot/BotModules/Infobot.bm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/webtools/mozbot/BotModules/Infobot.bm b/webtools/mozbot/BotModules/Infobot.bm index e081e8e86cb..19b6598e53a 100644 --- a/webtools/mozbot/BotModules/Infobot.bm +++ b/webtools/mozbot/BotModules/Infobot.bm @@ -263,13 +263,15 @@ sub SetFactoid { my($event, $replace, $subject, $database, $add, $object, $direct, $fromBot) = @_; if ($direct or $self->allowed($event, 'Learn')) { - teacher: if (@{$self->{'teachers'}}) { - foreach my $user (@{$self->{'teachers'}}) { - if ($user eq $event->{'userName'}) { - last teacher; + teacher: { + if (@{$self->{'teachers'}}) { + foreach my $user (@{$self->{'teachers'}}) { + if ($user eq $event->{'userName'}) { + last teacher; + } } + return 0; } - return 0; } # update the database