allow full turn off with RangerMetrics_runs false and deinit extension

This commit is contained in:
2023-04-22 22:04:22 -07:00
parent 4ca0e6fe00
commit 67310804dc
2 changed files with 14 additions and 1 deletions

View File

@@ -76,7 +76,14 @@ switch (_function) do {
} forEach RangerMetrics_allServerPoll;
};
call RangerMetrics_fnc_initCapture;
if (
missionNamespace getVariable [
"RangerMetrics_run",
false
]
) then {
call RangerMetrics_fnc_initCapture;
};
};
default {
_response call RangerMetrics_fnc_log;

View File

@@ -104,6 +104,12 @@ missionNamespace setVariable ["RangerMetrics_run", true, true];
// start sending
[{
params ["_args", "_idPFH"];
if !(
missionNamespace getVariable [
"RangerMetrics_run",
false
]
) exitWith {};
if (scriptDone RangerMetrics_sendBatchHandle) then {
RangerMetrics_sendBatchHandle = [] spawn RangerMetrics_fnc_send;
};