sourcebans-pp icon indicating copy to clipboard operation
sourcebans-pp copied to clipboard

Group capitalization

Open shavitush opened this issue 7 years ago • 2 comments

Expected Behavior

Changing the capitalization of a group's name should update it on the game server.

Current Behavior

Changes to a group's name's capitalization doesn't update it on the game server, causing the console to throw such errors:

L 12/27/2017 - 16:32:38: Info (map "jb_clouds_beta02") (file "errors_20171227.log")
L 12/27/2017 - 16:32:38: [sbpp/sbpp_admcfg.smx] Error(s) Detected Parsing addons/sourcemod/configs/sourcebans/sb_admins.cfg
L 12/27/2017 - 16:32:38: [sbpp/sbpp_admcfg.smx]  (line 160) Unknown group "Developer"

Possible Solution

  • User fix:

    1. Rename the group to anything else.
    2. Rehash the server.
    3. Rename it back.
  • Plugin fix:

    • Treat all groups as lowercase when updating the game server. So "Developer" in the database will be shown as "developer" and the admins will be assigned to "developer" rather than "Developer".

Steps to Reproduce (for bugs)

  1. Create a group, assign it to a user with game server access.
  2. Rehash the server.
  3. Rename the group to the same name, but with different capitalization.
  4. Rehash the server.

shavitush avatar Dec 27 '17 14:12 shavitush

+1, issue for a long time now and its quite annoying.

Chevalier2016 avatar Jan 17 '18 20:01 Chevalier2016

Well, issue is not related with SourceMod and SourceBans. So it works the game engine (Source Engine). You should keep in mind next fact: "SourceBans writes admins, groups, overrides with KeyValues on server File System. Another plugin sbpp_admcfg just read this file consistently and write into SourceMod Admin Cache". And now, read this post:

That is how Valve's KeyValues API works. It's not directly a part of SourceMod. Strings are pooled without case sensitively.

Well, to get rid of this "bug", you must leave from KeyValues. Maybe SQLite or binary files, idk.

CrazyHackGUT avatar Aug 16 '19 05:08 CrazyHackGUT