mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Rudimentary auth for DeleteObj
limits distance to object, as well as validating random auth key. added server_deleteObjDirect which is only for direct execution on the server, whereas server_deleteObj should be used for PVEH execution only
This commit is contained in:
23
SQF/dayz_server/compile/server_deleteObjDirect.sqf
Normal file
23
SQF/dayz_server/compile/server_deleteObjDirect.sqf
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
[_objectID,_objectUID,_activatingPlayer] call server_deleteObjDirect;
|
||||
*/
|
||||
private["_id","_uid","_key","_activatingPlayer"];
|
||||
|
||||
_id = _this select 0;
|
||||
_uid = _this select 1;
|
||||
_activatingPlayer = _this select 2;
|
||||
|
||||
if (isServer) then {
|
||||
//remove from database
|
||||
if (parseNumber _id > 0) then {
|
||||
//Send request
|
||||
_key = format["CHILD:304:%1:",_id];
|
||||
_key call server_hiveWrite;
|
||||
diag_log format["DELETE DIRECT: SERVER deleted object with ID: %1", _id];
|
||||
} else {
|
||||
//Send request
|
||||
_key = format["CHILD:310:%1:",_uid];
|
||||
_key call server_hiveWrite;
|
||||
diag_log format["DELETE DIRECT: SERVER deleted object with UID: %1", _uid];
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user