Open crashzk opened 4 years ago
I think it would be better if rename folder sourcebans
to sbpp
and remove duplicates from configs names.
Like:
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.
/**
* 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]));
}
}
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 intoadmin_groups
with nameAdmin
, but inadmins
group name can be written asadmin
(as expected). Effect - SM returnsINVALID_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?
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.