/** * ExileServerManager_system_thread_check * * Bryan * www.arcasindustries.com * © 2017 Arcas Industries * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. */ private["_return", "_function", "_parameters"]; _return = parseSimpleArray(["request", []] call ExileServerManager_util_dll_call); if (!(_return select 0)) exitWith { }; if (ESM_DebugEnabled) then { _return call ExileServerManager_util_log; }; _function = (_return select 1) select 0; _parameters = (_return select 1) select 1; if !(_function in (getArray(configFile >> "CfgESM" >> "functionWhitelist"))) exitWith { format["Function %1 called by ESM but it wasn't whitelisted", _function] call ExileServerManager_util_log; }; if (missionNameSpace getVariable [_function, ""] isEqualTo "") exitWith { format["Function %1 called by ESM but it wasn't compiled", _function] call ExileServerManager_util_log; }; if (ESM_DebugEnabled) then { format["Function: %1 with parameters: %2", _function, _parameters] call ExileServerManager_util_log; }; _parameters spawn (missionNamespace getVariable [_function, {}]); true