sourcebans-pp
sourcebans-pp copied to clipboard
Fix Comms, Nasty Issue (LOL)
I can't understand how it hasn't been fixed by now.
I'm guessing it hasn't been fixed since it isn't actually an issue as the TempUnBlock function resets the DataPack before doing anything else with it (LOL)
I'm guessing it hasn't been fixed since it isn't actually an issue as the TempUnBlock function resets the DataPack before doing anything else with it (LOL)
Actually he right. Here: https://github.com/sbpp/sourcebans-pp/blob/2dca124299f4690fb61c9933bd3485ae16d1b9a0/game/addons/sourcemod/scripting/sbpp_comms.sp#L1514 And here: https://github.com/sbpp/sourcebans-pp/blob/2dca124299f4690fb61c9933bd3485ae16d1b9a0/game/addons/sourcemod/scripting/sbpp_comms.sp#L1519 Plugin write cell on position. With 16 it's corrupt reason string in datapack. Third cell is type: https://github.com/sbpp/sourcebans-pp/blob/2dca124299f4690fb61c9933bd3485ae16d1b9a0/game/addons/sourcemod/scripting/sbpp_comms.sp#L2531
... Actually... For what pass DataPack in function and unpack it's again? I think we must pass normal params in this function.
Oh yeah, my bad. His pull request just sounded super condescending to me so I wanted to be super condescending back :p But yeah normal params could be used instead of DataPack here if need be, would save having to declare variables for them inside the function at least.
It was throwing error logs. I hate seeing error logs in my logs folder. It only happened for !ungag !unsilence or !unmute.
Wrong.
Value must be 2
. My mistake. Positions start from 0
.
Actually this code can be removed.
https://github.com/sbpp/sourcebans-pp/blob/39ca1c51e56a81f0ec3abe1e3f4a1cd94d8caa65/game/addons/sourcemod/scripting/sbpp_comms.sp#L1393
https://github.com/sbpp/sourcebans-pp/blob/39ca1c51e56a81f0ec3abe1e3f4a1cd94d8caa65/game/addons/sourcemod/scripting/sbpp_comms.sp#L1425
https://github.com/sbpp/sourcebans-pp/blob/39ca1c51e56a81f0ec3abe1e3f4a1cd94d8caa65/game/addons/sourcemod/scripting/sbpp_comms.sp#L1499-L1523
This checks always false
:
https://github.com/sbpp/sourcebans-pp/blob/39ca1c51e56a81f0ec3abe1e3f4a1cd94d8caa65/game/addons/sourcemod/scripting/sbpp_comms.sp#L1512
https://github.com/sbpp/sourcebans-pp/blob/39ca1c51e56a81f0ec3abe1e3f4a1cd94d8caa65/game/addons/sourcemod/scripting/sbpp_comms.sp#L1517
Because b_success == true
only here:
https://github.com/sbpp/sourcebans-pp/blob/39ca1c51e56a81f0ec3abe1e3f4a1cd94d8caa65/game/addons/sourcemod/scripting/sbpp_comms.sp#L1425
But if target != 0
(second check on 1499 line) called this function above:
- PerformUnMute(target);
- stock void PerformUnMute(int target)
- MarkClientAsUnMuted(target);
- stock void MarkClientAsUnMuted(int target)
- g_MuteType[target] = bNot;
(Almost same trace for PerformUnGag)
And checks never pass.
If any magic forced this checks passed, we have new error: DataPack
closed in TempUnBlock()
and new stacktrace here!
Also i not found any other need to call this code.
Сan someone test this version? https://github.com/TheByKotik/sourcebans-pp/blob/comms-fix-and-cleanup/game/addons/sourcemod/scripting/sbpp_comms.sp I'm did little changes and tried fix that. I can't test it in different situations also i haven't time for fix it by another way. It must resolve this completely for now.