sbpp / sourcebans-pp

Admin, ban, and comms management system for the Source engine
https://sbpp.github.io/
Creative Commons Attribution Share Alike 4.0 International
335 stars 174 forks source link

sb_admin_groups.cfg does not update on servers after group change in web interface #751

Closed crashzk closed 1 year ago

crashzk commented 3 years ago

What happens?

We changed the privilege groups on the web interface, changing the group name for example and not updating on servers, for example.

I had created the privilege group vip, then changed everything to VIP in capital letters, but on servers the groups do not update, everything remains small.

I changed it to other names, VIPP, VIPPP so it updates normally, but if I leave only VIP it goes back to tiny.

I already deleted the files to create from scratch and nothing, same problem.

What were you expecting to happen?

Atualizase o no do grupo de privilégios para VIP, atualizar para como eu configurei no caso.

Any logs, error output, etc.?

L 09/20/2021 - 14:50:35: [sbpp_admcfg.smx] Error(s) Detected Parsing addons/sourcemod/configs/sourcebans/sb_admins.cfg
L 09/20/2021 - 14:50:35: [sbpp_admcfg.smx]  (line 110) Unknown group "VIP"
L 09/20/2021 - 14:50:35: [sbpp_admcfg.smx]  (line 128) Unknown group "VIP"
L 09/20/2021 - 14:50:35: [sbpp_admcfg.smx]  (line 134) Unknown group "VIP"
L 09/20/2021 - 14:50:35: [sbpp_admcfg.smx]  (line 146) Unknown group "VIP"

Any other comments?

image

image

This only happens in the privilege group list, in the privileged players list it is updating normally.

image

I believe it is the same problem mentioned here: https://github.com/sbpp/sourcebans-pp/issues/727

What versions of software are you using?

Operating System: Server CSGO Linux | Hosting Web Linux SourceBans++ Version: 1.7.0 SourceMod Version: 1.10.0.6510 MetaMod Version: 1.11 - build 1145 PHP Version: 7.3 MySQL Version: 10.3.31-MariaDB

crashzk commented 3 years ago

I deleted the group in question from the web interface, turned off the servers and turned it back on.

Then I created the group again, same name, everything in capital letters and still nothing, it's still small.

image

image

CrazyHackGUT commented 2 years ago

This is Source Engine issue, not SB++ and not SourceMod. Reason - used format for storing administrators and groups. Valve KeyValues caches first read capital and forces them for any operations like writing into files. This issue appears only in keys. Some details can be found on HLmod (russian forum), also SM devs confirmed this issue on AM.

As possible solution - use any another format, such as JSON (requires installing additional extension, like smjansson or REST in Pawn) or create binary format. I did latest variant in my custom SB plugins recently, and it showed yourself as "stable solution". I can adopt code for SB++ plugins, and make a Pull Request, if SB++ maintainers interested in this.