Add better logging for server_deleteObj

This commit is contained in:
A Man
2020-04-03 14:54:58 +02:00
parent ad41a9a7f4
commit f6e7a1a91e
6 changed files with 32 additions and 26 deletions

View File

@@ -1,10 +1,11 @@
/*
[_objectID,_objectUID] call server_deleteObjDirect;
[_objectID,_objectUID,_obj] call server_deleteObjDirect;
*/
private["_id","_uid","_key"];
private ["_id","_uid","_key","_obj"];
_id = _this select 0;
_uid = _this select 1;
_obj = ["Object",typeof (_this select 2)] select (count _this > 2);
if (isServer) then {
//remove from database
@@ -12,11 +13,11 @@ if (isServer) 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];
diag_log format["DELETE DIRECT: SERVER deleted %2 with ID: %1", _id, _obj];
} 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];
diag_log format["DELETE DIRECT: SERVER deleted %2 with UID: %1", _uid, _obj];
};
};