Permalink
Browse files

Fix karma to get reduced if -1 even if karma<maxkarma

  • Loading branch information...
pudge committed Aug 16, 2000
1 parent 9103221 commit 0d2ce4f05075cecaeed0379923c487e45b5b7424
Showing with 24 additions and 6 deletions.
  1. +12 −3 public_html/comments.pl
  2. +12 −3 themes/slashcode/htdocs/comments.pl
View
@@ -868,10 +868,19 @@ sub moderateCid {
-ts => 'now()'
});
# Adjust comment posters karma
sqlUpdate("users_info", { -karma => "karma$val" },
"uid=$cuid AND karma<$I{maxkarma}"
) if $val && $cuid > 0;
if ($cuid > 0) {
if ($val > 0) {
sqlUpdate("users_info", { -karma => "karma$val" },
"uid=$cuid AND karma<$I{maxkarma}"
);
} elsif ($val < 0) {
sqlUpdate("users_info", { -karma => "karma$val" },
"uid=$cuid"
);
}
}
# Adjust moderators total mods
sqlUpdate(
@@ -868,10 +868,19 @@ sub moderateCid {
-ts => 'now()'
});
# Adjust comment posters karma
sqlUpdate("users_info", { -karma => "karma$val" },
"uid=$cuid AND karma<$I{maxkarma}"
) if $val && $cuid > 0;
if ($cuid > 0) {
if ($val > 0) {
sqlUpdate("users_info", { -karma => "karma$val" },
"uid=$cuid AND karma<$I{maxkarma}"
);
} elsif ($val < 0) {
sqlUpdate("users_info", { -karma => "karma$val" },
"uid=$cuid"
);
}
}
# Adjust moderators total mods
sqlUpdate(

0 comments on commit 0d2ce4f

Please sign in to comment.