my($message) = @_;
my($lhs,$mhs,$rhs);
my($result,$reply);
- my $literal = 0;
$orig{message} = $message;
if (!defined $message or $message =~ /^\s*$/) {
$lhs = $message;
$mhs = "is";
$rhs = $result;
+
+ return "$lhs $mhs $rhs" if ($literal);
} else {
return '';
}
# result is random if separated by '||'.
# rhs is full factoid with '||'.
if ($mhs eq "is") {
- $reply = &getRandom(keys %{$lang{'factoid'}});
+ $reply = &getRandom(keys %{ $lang{'factoid'} });
$reply =~ s/##KEY/$lhs/;
$reply =~ s/##VALUE/$result/;
} else {
$reply =~ s/\$randpercentage/$randp/g; # ???
# randnick.
if ($reply =~ /\$randnick/) {
- my @nicks = keys %{$channels{$chan}{''}};
+ my @nicks = keys %{ $channels{$chan}{''} };
my $randnick = $nicks[ int($rand*$#nicks) ];
s/\$randnick/$randnick/;
}
return $string;
}
-
1;