fixed karma voting

This commit is contained in:
Steffen Schröder 2013-12-31 11:53:10 +01:00
parent 40548ed7fc
commit a9b97d179d

View File

@ -35,7 +35,10 @@ class KarmaPlugin implements CallbackListener, Plugin {
/**
* Private properties
*/
/** @var maniaControl $maniaControl */
/**
*
* @var maniaControl $maniaControl
*/
private $maniaControl = null;
private $updateManialink = false;
private $manialink = null;
@ -220,8 +223,7 @@ class KarmaPlugin implements CallbackListener, Plugin {
if ($chatCallback[1][3]) {
$message = substr($message, 1);
}
$firstChar = substr($message, 0, 1);
if ($firstChar !== '+' && $firstChar !== '-') {
if (preg_match('/[^+-]/', $message)) {
return;
}
$vote = substr_count($message, '+');