# only remove '<reply>'
if (!$real and $reply =~ s/^\s*<reply>\s*//i) {
# 'are' fix.
- if ($reply =~ s/^are //i) {
+ if ($reply =~ s/^are /$lhs are /i) {
&DEBUG("Reply.pl: el-cheapo 'are' fix executed.");
- $mhs = "are";
+ $mhs = "are"; # what's this for?
}
} elsif (!$real and $reply =~ s/^\s*<action>\s*(.*)/\cAACTION $1\cA/i) {
return $noreply;
}
- # nice 'are' hack (or work-around).
- if ($mhs =~ /^are$/i and $rhs !~ /<\S+>/) {
- $mhs = "is";
- $rhs = "<REPLY> are ". $rhs;
- }
-
# invalid verb.
- if ($mhs !~ /^is$/i) {
+ if ($mhs !~ /^(is|are)$/i) {
&ERROR("UNKNOWN verb: $mhs.");
return;
}
}
if (my $exists = &getFactoid($lhs)) { # factoid exists.
- chomp $exists;
-
if ($exists eq $rhs) {
&performAddressedReply("i already had it that way");
return $noreply;
}
}
} else { # not exists.
+
+ # nice 'are' hack (or work-around).
+ if ($mhs =~ /^are$/i and $rhs !~ /<\S+>/) {
+ &DEBUG("Update: 'are' hack detected.");
+ $mhs = "is";
+ $rhs = "<REPLY> are ". $rhs;
+ }
+
&status("enter: <$who> \'$lhs\' =$mhs=> \'$rhs\'");
$count{'Update'}++;