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;
}
if (!array_key_exists('S_UseScriptCallbacks', $scriptSettings)) {
return false;
}
$scriptSettings['S_UseScriptCallbacks'] = (bool) $enable;
$actionName = ($enable ? 'en' : 'dis');
$this->maniaControl->getClient()->setModeScriptSettings($scriptSettings);
Logger::logInfo("Script Callbacks successfully {$actionName}abled!");
$this->maniaControl->getClient()->triggerModeScriptEvent('XmlRpc.EnableCallbacks', array('true'));
Logger::logInfo("Script Callbacks successfully enabled!");
return true;
}