labels can only go on blocks, not if statements, apparently. fixes bug 139646

This commit is contained in:
ian%hixie.ch 2003-08-16 19:56:40 +00:00
Родитель 685d9c3233
Коммит 25dfb6f913
1 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -263,13 +263,15 @@ sub SetFactoid {
my($event, $replace, $subject, $database, $add, $object, $direct, $fromBot) = @_; my($event, $replace, $subject, $database, $add, $object, $direct, $fromBot) = @_;
if ($direct or $self->allowed($event, 'Learn')) { if ($direct or $self->allowed($event, 'Learn')) {
teacher: if (@{$self->{'teachers'}}) { teacher: {
foreach my $user (@{$self->{'teachers'}}) { if (@{$self->{'teachers'}}) {
if ($user eq $event->{'userName'}) { foreach my $user (@{$self->{'teachers'}}) {
last teacher; if ($user eq $event->{'userName'}) {
last teacher;
}
} }
return 0;
} }
return 0;
} }
# update the database # update the database