]> git.donarmstrong.com Git - infobot.git/blobdiff - src/UserExtra.pl
- sql function changeover stuff.
[infobot.git] / src / UserExtra.pl
index 24134088410f3f221e10b9e35f3be5dd9ba865f8..e38fa950b04a0495ff5fdadd765123d54564d028 100644 (file)
@@ -792,7 +792,7 @@ sub userCommands {
     if ($message =~ /^statu?s$/i) {
        my $startString = scalar(gmtime $^T);
        my $upString    = &Time2String(time() - $^T);
-       my $count       = &countKeys("factoids");
+       my $factoids    = &countKeys("factoids");
 
        $count{'Commands'}      = 0;
        foreach (keys %cmdstats) {
@@ -812,15 +812,18 @@ sub userCommands {
          " and \002$count{'Commands'}\002 ".
                &fixPlural("command",$count{'Commands'}).
          ".  I have been awake for $upString this session, and ".
-         "currently reference \002$count\002 factoids.  ".
+         "currently reference \002$factoids\002 factoids.  ".
          "I'm using about \002$memusage\002 ".
          "kB of memory."
        );
 
+       return;
+
        # todo: use dbGetColNiceHash().
-       my %hash = &dbGetCol("stats", "nick,counter", "type='cmdstats'".
-#                      " ORDER BY counter DESC LIMIT 3", 1);
-                       " ORDER BY counter DESC", 1);
+       my %hash = &sqlSelectColHash("stats", "nick,counter",
+               { type => "cmdstats" }, 1);
+# does ORDER matter when used with a hash?
+#                      " ORDER BY counter DESC", 1);
 
 if (0) {
        foreach (keys %hash) {