small fix
This commit is contained in:
parent
13c73c3003
commit
1541c53417
@ -39,7 +39,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
/**
|
||||
* Constants MX Karma
|
||||
*/
|
||||
const SETTING_MX_KARMA_AKTIVATED = 'Aktivate MX-Karma';
|
||||
const SETTING_MX_KARMA_ACTIVATED = 'Aktivate MX-Karma';
|
||||
const MX_KARMA_SETTING_CODE = 'MX Karma Code for ';
|
||||
const MX_KARMA_URL = 'http://karma.mania-exchange.com/api2/';
|
||||
const MX_KARMA_STARTSESSION = 'startSession';
|
||||
@ -65,7 +65,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
* @return mixed
|
||||
*/
|
||||
public static function prepare(ManiaControl $maniaControl) {
|
||||
$maniaControl->settingManager->initSetting(get_class(), self::SETTING_MX_KARMA_AKTIVATED, true);
|
||||
$maniaControl->settingManager->initSetting(get_class(), self::SETTING_MX_KARMA_ACTIVATED, true);
|
||||
$servers = $maniaControl->server->getAllServers();
|
||||
foreach($servers as $server) {
|
||||
$maniaControl->settingManager->initSetting(get_class(), self::MX_KARMA_SETTING_CODE . $server->login, '');
|
||||
@ -369,7 +369,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
}
|
||||
|
||||
//Update vote in MX karma array
|
||||
if ($this->maniaControl->settingManager->getSetting($this, self::SETTING_MX_KARMA_AKTIVATED)) {
|
||||
if ($this->maniaControl->settingManager->getSetting($this, self::SETTING_MX_KARMA_ACTIVATED)) {
|
||||
$this->mxKarma["votes"][$player->login] = $vote * 100;
|
||||
}
|
||||
|
||||
@ -527,7 +527,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
* Open a Mx Karma Session
|
||||
*/
|
||||
private function mxKarmaOpenSession() {
|
||||
if (!$this->maniaControl->settingManager->getSetting($this, self::SETTING_MX_KARMA_AKTIVATED)) {
|
||||
if (!$this->maniaControl->settingManager->getSetting($this, self::SETTING_MX_KARMA_ACTIVATED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -565,6 +565,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
|
||||
/**
|
||||
* Activates the MX-Karma Session
|
||||
*
|
||||
* @param $mxKarmaCode
|
||||
*/
|
||||
private function activateSession($mxKarmaCode) {
|
||||
@ -592,7 +593,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
* Save Mx Karma Votes at Mapend
|
||||
*/
|
||||
public function saveMxKarmaVotes(Map $map) {
|
||||
if (!$this->maniaControl->settingManager->getSetting($this, self::SETTING_MX_KARMA_AKTIVATED)) {
|
||||
if (!$this->maniaControl->settingManager->getSetting($this, self::SETTING_MX_KARMA_ACTIVATED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -642,8 +643,10 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
}
|
||||
}, $content, false, 'application/json');
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a sha512 activation Hash for the MX-Karma
|
||||
*
|
||||
* @param $sessionSeed
|
||||
* @param $mxKey
|
||||
* @return string
|
||||
|
Loading…
Reference in New Issue
Block a user