Update ScriptManager.php

Added XmlRpc.EnableCallbacks for TrackMania aswell as Shootmania.
This commit is contained in:
W1lla van den Munckhof 2017-03-22 11:15:52 +01:00 committed by GitHub
parent 795df0ed2c
commit df2d548755

View File

@ -47,15 +47,8 @@ class ScriptManager {
return false; return false;
} }
if (!array_key_exists('S_UseScriptCallbacks', $scriptSettings)) { $this->maniaControl->getClient()->triggerModeScriptEvent('XmlRpc.EnableCallbacks', array('true'));
return false; Logger::logInfo("Script Callbacks successfully enabled!");
}
$scriptSettings['S_UseScriptCallbacks'] = (bool) $enable;
$actionName = ($enable ? 'en' : 'dis');
$this->maniaControl->getClient()->setModeScriptSettings($scriptSettings);
Logger::logInfo("Script Callbacks successfully {$actionName}abled!");
return true; return true;
} }