]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Factoids/Question.pl
added another link for the ICAO manual lookup; first one may error out
[infobot.git] / src / Factoids / Question.pl
index 8535aa19b1ac1c771c6a1e97461ba9a5c00756f2..0b7ae04c658755ccb7cce13c0d30136bff23d941 100644 (file)
@@ -132,8 +132,7 @@ sub doQuestion {
                # support command redirection.
                # recursive cmdHooks aswell :)
                my $done = 0;
-               $done++ if &parseCmdHook("main", $link);
-               $done++ if &parseCmdHook("extra", $link);
+               $done++ if &parseCmdHook($link);
                $message        = $link;
                $done++ unless (&Modules());
 
@@ -189,7 +188,7 @@ sub factoidArgs {
     # TODO: cache this, update cache when altered. !!! !!! !!!
 #    my $t = &timeget();
     my ($first) = split(/\s+/, $str);
-    my @list = &searchTable("factoids", "factoid_key", "factoid_key", "^CMD: $first ");
+    my @list = &searchTable("factoids", "factoid_key", "factoid_key", "^cmd: $first ");
 #    my $delta_time = &timedelta($t);
 #    &DEBUG("factArgs: delta_time = $delta_time s");
 #    &DEBUG("factArgs: list => ".scalar(@list) );
@@ -201,7 +200,7 @@ sub factoidArgs {
     foreach (sort { length($b) <=> length($a) } @list) {
        next if (/#DEL#/);      # deleted.
 
-       s/^CMD: //i;
+       s/^cmd: //i;
 #      &DEBUG("factarg: '$str' =~ /^$_\$/");
        my $arg = $_;
 
@@ -231,7 +230,7 @@ sub factoidArgs {
        &status("Question: factoid Arguments for '$str'");
        # TODO: use getReply() - need to modify it :(
        my $i   = 0;
-       my $q   = "CMD: $_";
+       my $q   = "cmd: $_";
        my $r   = &getFactoid($q);
        if (!defined $r) {
            &DEBUG("question: !result... should this happen?");