]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Factoids/Question.pl
standard TODO: and FIXME:
[infobot.git] / src / Factoids / Question.pl
index 74a24163e30f17f2df6072c1b66278bd59bb5047..3e93b05ca22f6df4470b5486bf017415181c24d7 100644 (file)
@@ -154,13 +154,6 @@ sub doQuestion {
        return $result;
     }
 
-    ### TODO: Use &Forker(); move function to Freshmeat.pl.
-    if (&IsChanConf("freshmeatForFactoid")) {
-       &loadMyModule($myModules{'freshmeat'});
-       $result = &Freshmeat::showPackage($query);
-       return $result if (defined $result);
-    }
-
     ### TODO: Use &Forker(); move function to Debian.pl
     if (&IsChanConf("debianForFactoid")) {
        &loadMyModule($myModules{'debian'});
@@ -193,9 +186,9 @@ sub factoidArgs {
 
     # to make it eleeter, split each arg and use "blah OR blah or BLAH"
     # which will make it less than linear => quicker!
-    # todo: cache this, update cache when altered. !!! !!! !!!
+    # TODO: cache this, update cache when altered. !!! !!! !!!
 #    my $t = &timeget();
-    my ($first) = split(/\s+/, $str); 
+    my ($first) = split(/\s+/, $str);
     my @list = &searchTable("factoids", "factoid_key", "factoid_key", "^CMD: $first ");
 #    my $delta_time = &timedelta($t);
 #    &DEBUG("factArgs: delta_time = $delta_time s");
@@ -212,7 +205,7 @@ sub factoidArgs {
 #      &DEBUG("factarg: '$str' =~ /^$_\$/");
        my $arg = $_;
 
-       # todo: <greycat> ~punish apt for (Eating) (Parentheses)
+       # TODO: <greycat> ~punish apt for (Eating) (Parentheses)
        # how the hell do I fix the above? -dms.
 
        # eval (evil!) code. cleaned up courtesy of lear.
@@ -236,7 +229,7 @@ sub factoidArgs {
 #      &DEBUG("vals => @vals");
 
        &status("Question: factoid Arguments for '$str'");
-       # todo: use getReply() - need to modify it :(
+       # TODO: use getReply() - need to modify it :(
        my $i   = 0;
        my $q   = "CMD: $_";
        my $r   = &getFactoid($q);
@@ -246,19 +239,11 @@ sub factoidArgs {
        }
 
        # update stats.
-       if (0) {        # old.
-           my $count = &getFactInfo($q, "requested_count") || 0;
-           $count++;
-           &setFactInfo($q, "requested_by", $nuh);
-           &setFactInfo($q, "requested_time", time());
-           &setFactInfo($q, "requested_count", $count);
-       } else {
-           &sqlUpdate("factoids", { factoid_key => $q }, {
-               requested_by            => $nuh,
-               requested_time          => time(),
-               -requested_count        => "requested_count+1",
-           } );
-       }
+       &sqlUpdate("factoids", { factoid_key => $q }, {
+           requested_by        => $nuh,
+           requested_time      => time(),
+           -requested_count    => "requested_count+1",
+       } );
 
        # end of update stats.