diff --git a/application/plugins/Karma.php b/application/plugins/Karma.php index 9de039e0..a488ab00 100644 --- a/application/plugins/Karma.php +++ b/application/plugins/Karma.php @@ -231,8 +231,12 @@ class KarmaPlugin implements CallbackListener, Plugin { if(preg_match('/[^+-]/', $message)) { return; } - $vote = substr_count($message, '+'); - $vote -= substr_count($message, '-'); + $countPositive = substr_count($message, '+'); + $countNegative = substr_count($message, '-'); + if ($countPositive <= 0 && $countNegative <= 0) { + return; + } + $vote = $countPositive - $countNegative; $success = $this->handleVote($player, $vote); if(!$success) { $this->maniaControl->chat->sendError('Error occurred.', $player->login);