diff --git a/SQF/dayz_code/compile/fn_damageHandler.sqf b/SQF/dayz_code/compile/fn_damageHandler.sqf index 60b1cabea..2ed31121c 100644 --- a/SQF/dayz_code/compile/fn_damageHandler.sqf +++ b/SQF/dayz_code/compile/fn_damageHandler.sqf @@ -163,7 +163,7 @@ if (_unit == player) then { default { "with suspicious weapon" }; }; if (!_isZombieHit) then { // don't log any zombie wounds, even from remote zombies - PVDZ_sec_atp = [_unit, _source, _sourceWeap, _sourceDist]; + PVDZ_sec_atp = [_unit, _source, toArray _sourceWeap, _sourceDist]; //Send arbitrary string as array to allow stricter publicVariableVal.txt filter publicVariableServer "PVDZ_sec_atp"; }; }; diff --git a/SQF/dayz_code/init/publicEH.sqf b/SQF/dayz_code/init/publicEH.sqf index 250e22735..0aa6a1cb7 100644 --- a/SQF/dayz_code/init/publicEH.sqf +++ b/SQF/dayz_code/init/publicEH.sqf @@ -36,15 +36,15 @@ if (_ammo != "" && _ammo isKindOf "HelicopterExploSmall") then { _who = player; _dist = round (_who distance _building); - PVDZ_sec_atp = format ["UID#%1 d4maged %2 %5 to %3pct with ammo %4 at dist4nce %6m.", - getPlayerUID _who, typeOf _building, round (100 * _dmgLvl), _ammo, _part, _dist]; + PVDZ_sec_atp = toArray (format ["UID#%1 d4maged %2 %5 to %3pct with ammo %4 at dist4nce %6m.", + getPlayerUID _who, typeOf _building, round (100 * _dmgLvl), _ammo, _part, _dist]); publicVariableServer "PVDZ_sec_atp"; }; } else { if (_who == player) then { _dist = round (_who distance _building); - PVDZ_sec_atp = format ["UID#%1 d4maged %2 %5 to %3pct with ammo %4 at dist4nce %6m.", - getPlayerUID _who, typeOf _building, round (100 * _dmgLvl), _ammo, _part, _dist]; + PVDZ_sec_atp = toArray (format ["UID#%1 d4maged %2 %5 to %3pct with ammo %4 at dist4nce %6m.", + getPlayerUID _who, typeOf _building, round (100 * _dmgLvl), _ammo, _part, _dist]); publicVariableServer "PVDZ_sec_atp"; }; }; diff --git a/SQF/dayz_code/system/antihack.sqf b/SQF/dayz_code/system/antihack.sqf index 4791535a1..10e2701a9 100644 --- a/SQF/dayz_code/system/antihack.sqf +++ b/SQF/dayz_code/system/antihack.sqf @@ -12,7 +12,7 @@ inGameUISetEventHandler ["Action","false"]; _plant = _x createVehicleLocal dayz_centerMarker; uiSleep 0.1; if (sizeOf _x == 0) exitWith { - PVDZ_sec_atp = "Plants texture hack for type " + _x; + PVDZ_sec_atp = toArray ("Plants texture hack for type " + _x); publicVariableServer "PVDZ_sec_atp"; endMission "LOSER"; }; diff --git a/SQF/dayz_code/system/scheduler/sched_antiTeleport.sqf b/SQF/dayz_code/system/scheduler/sched_antiTeleport.sqf index c0967e210..60691ac98 100644 --- a/SQF/dayz_code/system/scheduler/sched_antiTeleport.sqf +++ b/SQF/dayz_code/system/scheduler/sched_antiTeleport.sqf @@ -48,7 +48,7 @@ sched_antiTP = { if (_lastVehicle == vehicle player) then { if ((_speed > _topSpeed) && (alive player) && ((driver (vehicle player) == player) or (isNull (driver (vehicle player)))) && (_debug distance _lastpos > 3000) && !((vehicle player == player) && (_curheight < _lastheight) && ((_curheight - _terrainHeight) > 1))) then { (vehicle player) setposATL _lastpos; - PVDZ_sec_atp = format["TELEPORT REVERT for player UID#%1 from %2 to %3, %4 meters, now at %5", getPlayerUID player, _lastpos, _curPos, round(_lastpos distance _curpos), getPosATL player]; + PVDZ_sec_atp = toArray (format["TELEPORT REVERT for player UID#%1 from %2 to %3, %4 meters, now at %5", getPlayerUID player, _lastpos, _curPos, round(_lastpos distance _curpos), getPosATL player]); publicVariableServer "PVDZ_sec_atp"; } else { _lastpos = _curpos; diff --git a/SQF/dayz_code/system/scheduler/sched_security.sqf b/SQF/dayz_code/system/scheduler/sched_security.sqf index e9fab9512..58f12ba91 100644 --- a/SQF/dayz_code/system/scheduler/sched_security.sqf +++ b/SQF/dayz_code/system/scheduler/sched_security.sqf @@ -18,14 +18,14 @@ sched_security = { _time = time; if (typeName player != "OBJECT") then { - PVDZ_sec_atp = format["WARNING typename error for player UID#%1", getPlayerUID player]; + PVDZ_sec_atp = toArray (format["WARNING typename error for player UID#%1", getPlayerUID player]); publicVariableServer "PVDZ_sec_atp"; endMission "LOSER"; }; switch (true) do { case (1==0) : { - PVDZ_sec_atp = format["WARNING true error for player UID#%1", getPlayerUID player]; + PVDZ_sec_atp = toArray (format["WARNING true error for player UID#%1", getPlayerUID player]); publicVariableServer "PVDZ_sec_atp"; endMission "LOSER"; }; @@ -35,7 +35,7 @@ sched_security = { if (_time - _otime > 1 or _time < _otime) then { _timeTrickCount = _timeTrickCount +1; if (_timeTrickCount > 2) then { - PVDZ_sec_atp = format["WARNING unusual time shift for UID#%1", getPlayerUID player]; + PVDZ_sec_atp = toArray (format["WARNING unusual time shift for UID#%1", getPlayerUID player]); publicVariableServer "PVDZ_sec_atp"; }; }; @@ -45,7 +45,7 @@ sched_security = { if (_pid != _netid) then { _idTrickCount = _idTrickCount +1; if (_idTrickCount > 2) then { - PVDZ_sec_atp = format["WARNING unusual outfit swap for UID#%1", getPlayerUID player]; + PVDZ_sec_atp = toArray (format["WARNING unusual outfit swap for UID#%1", getPlayerUID player]); publicVariableServer "PVDZ_sec_atp"; }; }; @@ -59,7 +59,7 @@ sched_security = { _u = (_list select _i); if (!isNull _u) then { _pos = getPosATL _u; - PVDZ_sec_atp = format [ "From play3r UID#%1: illegal gr0up m3mber %2 at %3,%4... Server may be compromised!", getPlayerUID player, typeOf _u, _pos select 0, _pos select 1]; + PVDZ_sec_atp = toArray (format [ "From play3r UID#%1: illegal gr0up m3mber %2 at %3,%4... Server may be compromised!", getPlayerUID player, typeOf _u, _pos select 0, _pos select 1]); publicVariableServer "PVDZ_sec_atp"; deleteVehicle _u; _quit = true; diff --git a/SQF/dayz_server/system/server_monitor.sqf b/SQF/dayz_server/system/server_monitor.sqf index 079ff23d6..0abe95396 100644 --- a/SQF/dayz_server/system/server_monitor.sqf +++ b/SQF/dayz_server/system/server_monitor.sqf @@ -367,8 +367,8 @@ if (dayz_townGenerator && {toLower worldName == "chernarus"}) then {execVM "\z\a "PVDZ_sec_atp" addPublicVariableEventHandler { _x = _this select 1; switch (1==1) do { - case (typeName _x == "STRING") : { // just some logs from the client - diag_log _x; + case (typeName (_x select 0) == "SCALAR") : { // just some logs from the client + diag_log (toString _x); }; case (count _x == 2) : { // wrong side diag_log format["P1ayer %1 reports possible 'side' hack. Server may be compromised!",(_x select 1) call fa_plr2Str]; @@ -378,7 +378,7 @@ if (dayz_townGenerator && {toLower worldName == "chernarus"}) then {execVM "\z\a _source = _x select 1; if (((!(isNil {_source})) && {!(isNull _source)}) && {((_source isKindOf "CAManBase") && {owner _unit != owner _source})}) then { diag_log format ["P1ayer %1 hit by %2 %3 from %4 meters", - _unit call fa_plr2Str, _source call fa_plr2Str, _x select 2, _x select 3]; + _unit call fa_plr2Str, _source call fa_plr2Str, toString (_x select 2), _x select 3]; if (_unit getVariable ["processedDeath",0] == 0) then { _unit setVariable ["attacker", name _source]; _unit setVariable ["noatlf4", diag_ticktime]; // server-side "not in combat" test, if player is not already dead diff --git a/Server Files/Battleye/publicvariableval.txt b/Server Files/Battleye/publicvariableval.txt index 68c6f4d4d..1cddf84ca 100644 --- a/Server Files/Battleye/publicvariableval.txt +++ b/Server Files/Battleye/publicvariableval.txt @@ -1,5 +1,6 @@ //new -5 "[+;{&%]" !"e\+0" !PVDZ_sec_atp +5 "[;{&%]" +5 "\+" !"e\+0" 1 "wrong side" // group hack, ban the first in a row 1 "(init|set|add|action|all|attach|ATL|ASL|eye|exec|group|unit|clear|create|menu|ctrl|display|text|hint|drop)" !"\"(SetFuel|dayzSetDate|titleText|(|with )MeleeBaseball(|Bat(|Barbed|Nails))|StashSmall|smallboat_[12])\"" !"_Ball " !Attachement !Attachment_ !aslo 1 "(entit|exit|able|find|fuel|join|frame|move|team|throw)" !"\"(switchmove|ItemFuelcan(|Empty)|PartFueltank|SetFuel|z_refuel_0|ItemSodaRocketFuel|cable_tie)\""