]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Process.pl
stats are per channel instead of global ('PRIVATE') only
[infobot.git] / src / Process.pl
index 36cffd423054a12cfaebfdb9fb5a5c2d1da70a76..d2f1e5e9b8bd0c4d1126b3d86af3519d63776424 100644 (file)
@@ -309,16 +309,14 @@ sub process {
        }
 
        my $karma = &sqlSelect("stats", "counter",
-               { nick => $term, type => "karma" }) || 0;
+               { nick => $term, type => "karma", channel => $chan }) || 0;
        if ($inc eq '++') {
            $karma++;
        } else {
            $karma--;
        }
 
-       &sqlReplace("stats", {
-           nick        => $term,
-           type        => "karma",
+       &sqlSet("stats", {'nick' => $term, type => "karma", channel => $chan}, {
            'time'      => time(),
            counter     => $karma,
        } );