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
338 stars 174 forks source link

[Feature Request] Change name of files in the configs/sourcebans folder #652

Open crashzk opened 4 years ago

crashzk commented 4 years ago

Currently the files found in the addons/sourcemod/configs/sourcebans folder are named:

I believe that it should be updated, leaving a standard, as they did with the names of the plugins and translations, looking like this:

Something like that.

TheByKotik commented 4 years ago

I think it would be better if rename folder sourcebans to sbpp and remove duplicates from configs names.

Like:

CrazyHackGUT commented 4 years ago

I suggest another additional change. Data files (admin_groups, admins) should be moved into addons/sourcemod/data/sbpp (this files don't should be edited manually by admin), and migrate from KeyValues (used for writing) to another format. KeyValues have ancient bug when key name can be written into file with another letter case (because is cached on engine). For example, currently admin group with name admin can be written into admin_groups with name Admin, but in admins group name can be written as admin (as expected). Effect - SM returns INVALID_GROUP_ID when SB++ tries find group in SM cache and SB++ don't adds admin into cache.

CrazyHackGUT commented 4 years ago
/**
 * Reproduce plugin for SB++.
 * After starting this plugin, user can't use adequately group names:
 * * Root
 * * Test
 * * Example
 * KV always change letter case to:
 * * root
 * * test
 * * example
 *
 * Any non-standard plugin can cause this effect, and user may can't
 * understand, what the fuck is going.
 */

#include <sourcemod>

stock const char    g_szWords[][]   = {
    "root",
    "test",
    "example"
};

public void OnPluginStart()
{
    for (int iId = 0; iId < sizeof(g_szWords); ++iId)
    {
        CloseHandle(CreateKeyValues(g_szWords[iId]));
    }
}
crashzk commented 1 year ago

Sorry for the notification on old issues, but any news on this feature?

And especially the bug you mentioned:

KeyValues have ancient bug when key name can be written into file with another letter case (because is cached on engine). For example, currently admin group with name admin can be written into admin_groups with name Admin, but in admins group name can be written as admin (as expected). Effect - SM returns INVALID_GROUP_ID when SB++ tries find group in SM cache and SB++ don't adds admin into cache.

I have it too, or would there be any way to clear this cache?