mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 23:43:28 +00:00
added get_uid and get_auth_token functions
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
_atak_server_instance_username = missionNamespace getVariable "_atak_server_instance_username";
|
||||
_atak_server_instance_password = missionNamespace getVariable "_atak_server_instance_password";
|
||||
private _atak_server_instance = missionNamespace getVariable "_atak_server_instance";
|
||||
private _atak_server_instance_username = missionNamespace getVariable "_atak_server_instance_username";
|
||||
private _atak_server_instance_password = missionNamespace getVariable "_atak_server_instance_password";
|
||||
|
||||
_authentication = [_atak_server_instance_username, _atak_server_instance_password];
|
||||
private _authentication = [_atak_server_instance, _atak_server_instance_username, _atak_server_instance_password];
|
||||
|
||||
_atak_server_instance_token = "armatak" callExtension ["get_auth_token", _authentication];
|
||||
_atak_server_instance_token = ("armatak" callExtension ["get_auth_token", _authentication]) select 0;
|
||||
|
||||
if (_atak_server_instance_token != "") then {
|
||||
missionName setVariable ["_atak_server_instance_token", _atak_server_instance_token];
|
||||
if ((_atak_server_instance_token != "") and !(["error", _atak_server_instance_token, false] call BIS_fnc_inString)) then {
|
||||
missionNamespace setVariable ["_atak_server_instance_token", _atak_server_instance_token];
|
||||
|
||||
private _warning = format ["<t color='#FF0000'>ARMATAK</t><br/> %1", "Authorized"];
|
||||
private _warning = format ["<t color='#2B7319'>ARMATAK</t><br/> %1", "Authorized"];
|
||||
[[_warning, 1.5]] call CBA_fnc_notify;
|
||||
} else {
|
||||
private _warning = format ["<t color='#FF0000'>ARMATAK</t><br/> %1", "Failed to get Auth Token"];
|
||||
|
||||
Reference in New Issue
Block a user