/*
Bryan
Exile Server Manager
Fired from a request from the website. Updates the territory when we promote or demote a player.
*/
_option = _this select 0;
_uid = _this select 1;
_flagID = parseNumber(_this select 2);
try
{
// Get the flag object
_flagObject = _flagID call ExileServerManager_util_getFlagObject;
// Make sure we found it
if (isNull(_flagObject)) then
{
throw format["Could not find territory flag for database ID %1", _flagID];
};
// Update the flag rights (luckily, Exile already contains such a function)
[_flagObject, _uid, [TERRITORY_ACCESS_LEVEL_MEMBER,TERRITORY_ACCESS_LEVEL_MODERATOR] select (_option isEqualTo "add")] call ExileServer_system_territory_updateRights;
}
catch
{
_exception call ExileServerManager_util_log;
};