}
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,
} );
}
}
- if (&IsParam("factoids") and $param{'DBType'} =~ /^(mysql|sqlite|pgsql)/i) {
+ if (&IsParam("factoids") and $param{'DBType'} =~ /^(mysql|sqlite(2)?|pgsql)$/i) {
&FactoidStuff();
} elsif ($param{'DBType'} =~ /^none$/i) {
return "NO FACTOIDS.";