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,8 +76,15 @@ switch (_function) do {
} forEach RangerMetrics_allServerPoll; } forEach RangerMetrics_allServerPoll;
}; };
if (
missionNamespace getVariable [
"RangerMetrics_run",
false
]
) then {
call RangerMetrics_fnc_initCapture; call RangerMetrics_fnc_initCapture;
}; };
};
default { default {
_response call RangerMetrics_fnc_log; _response call RangerMetrics_fnc_log;
}; };

View File

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