Add sender verification to publish and swap object

Continuation of 8035df0

This is important to have on publish to identify cheaters who spam
create objects in the database or create objects with bad inventory.

- Renamed variables to backport to vanilla
- Removed % and & due to code filtering in publicvariableval.txt

Changes in modular_build.sqf were the same as player_build.sqf.

Tested with building, upgrading buildable/vehicle/tent, downgrading,
buying a vehicle, destroying tent and removing an object.
This commit is contained in:
ebayShopper
2017-11-03 16:09:14 -04:00
parent 6e48434001
commit 42e00475d6
41 changed files with 154 additions and 109 deletions

View File

@@ -98,7 +98,8 @@ switch (_status) do {
_holder setVariable ["BackpackCargo",_backpacks,false];
};
case 2: { //Packing
_packedClass = getText (configFile >> "CfgVehicles" >> _type >> "packedClass");
_packedClass = getText (configFile >> "CfgVehicles" >> _type >> "packedClass");
if (_packedClass == "") exitWith {diag_log format["Server_HandleSafeGear Error: invalid object type: %1",_type];};
_weapons = getWeaponCargo _obj;
_magazines = getMagazineCargo _obj;
_backpacks = getBackpackCargo _obj;
@@ -112,7 +113,7 @@ switch (_status) do {
[_weapons,_magazines,_backpacks,_holder] call server_addCargo;
// Delete safe from database
[_objectID,_objectUID,_player] call server_deleteObjDirect;
[_objectID,_objectUID] call server_deleteObjDirect;
};
};