]> git.donarmstrong.com Git - infobot.git/blobdiff - src/UserExtra.pl
dbm -> sql
[infobot.git] / src / UserExtra.pl
index e38fa950b04a0495ff5fdadd765123d54564d028..e39fa2a740ad8a7650b9556122fdec1a53ebd812 100644 (file)
@@ -221,8 +221,8 @@ sub factstats {
 
 sub karma {
     my $target = lc( shift || $who );
-    my $karma  = &dbGet("stats", "counter", "nick=".
-                       &dbQuote($target)." AND type='karma'") || 0; 
+    my $karma  = &sqlSelect("stats", "counter",
+       { nick => $target, type => "karma" }) || 0; 
 
     if ($karma != 0) {
        &pSReply("$target has karma of $karma");
@@ -819,10 +819,9 @@ sub userCommands {
 
        return;
 
-       # todo: use dbGetColNiceHash().
        my %hash = &sqlSelectColHash("stats", "nick,counter",
                { type => "cmdstats" }, 1);
-# does ORDER matter when used with a hash?
+# ORDER won't be retained in a hash
 #                      " ORDER BY counter DESC", 1);
 
 if (0) {