# TODO: cache this, update cache when altered. !!! !!! !!!
# my $t = &timeget();
my ($first) = split(/\s+/, $str);
+
+ # ignore split to commands [dumb commands vs. factoids] (editing commands?)
+ return undef if $str =~ /\s+\=\~\s+s[\#\/\:]/;
my @list = &searchTable("factoids", "factoid_key", "factoid_key", "^cmd: $first ");
# my $delta_time = &timedelta($t);
# &DEBUG("factArgs: delta_time = $delta_time s");
# end of update stats.
$result = $r;
+
$result =~ s/^\((.*?)\): //;
+ my $vars = $1;
- foreach ( split(',', $1) ) {
+ # start nasty hack to get partial &getReply() functionality.
+ $result = &SARit($result);
+
+ foreach ( split(',', $vars) ) {
my $val = $vals[$i];
# &DEBUG("val => $val");
$i++;
}
- # nasty hack to get partial &getReply() functionality.
- $result = &SARit($result);
+ # rest of nasty hack to get partial &getReply() functionality.
$result =~ s/^\s*<action>\s*(.*)/\cAACTION $1\cA/i;
$result =~ s/^\s*<reply>\s*//i;