Bug #166

Server permissions are not updated

Added by Procyon Procyon 168 days ago. Updated 167 days ago.

Status:Rejected Start:07/22/2008
Priority:Immediate Due date:
Assigned to:- % Done:

100%

Category:Game Plugin
Target version:1.2.0

Description

The server permissions are not updated on the game server if set to a one character string.

Let's set some random flags as a baseline.

mysql> select user,authid,srv_flags from sb_admins where aid=1;
+---------+--------------------+-----------+
| user    | authid             | srv_flags |
+---------+--------------------+-----------+
| Procyon | STEAM_0:1:19027173 | acdfm     |
+---------+--------------------+-----------+
1 row in set (0.01 sec)

Looks good.

sm_rehash
L 07/22/2008 - 03:22:41: [sourcebans.smx] Group game has 0 immunity

L 07/22/2008 - 03:22:41: [sourcebans.smx] [SourceBans] Finished loading 1 groups.
L 07/22/2008 - 03:22:41: [sourcebans.smx] Unknown group "" 
L 07/22/2008 - 03:22:41: [sourcebans.smx] Unknown group "" 
L 07/22/2008 - 03:22:41: [sourcebans.smx] [SourceBans] Finished loading 1 admins.

Ok.

$ cat admins.cfg
"Admins" 
{
        "Procyon" 
        {
                "auth"          "steam" 
                "identity"              "STEAM_0:1:19027173" 
                "immunity"              "100" 
                "flags"         "acdfm" 
        }
}


Excellent!

Now let's reproduce the bug. Change flags to 'z'.

mysql> select user,authid,srv_flags from sb_admins where aid=1;
+---------+--------------------+-----------+
| user    | authid             | srv_flags |
+---------+--------------------+-----------+
| Procyon | STEAM_0:1:19027173 | z         |
+---------+--------------------+-----------+
1 row in set (0.00 sec)

Looks good.

sm_rehash
L 07/22/2008 - 03:24:34: [sourcebans.smx] Group game has 0 immunity

L 07/22/2008 - 03:24:34: [sourcebans.smx] [SourceBans] Finished loading 1 groups.
L 07/22/2008 - 03:24:35: [sourcebans.smx] Unknown group "" 
L 07/22/2008 - 03:24:35: [sourcebans.smx] Unknown group "" 
L 07/22/2008 - 03:24:35: [sourcebans.smx] [SourceBans] Finished loading 1 admins.

Ok.

$ cat admins.cfg
"Admins" 
{
        "Procyon" 
        {
                "auth"          "steam" 
                "identity"              "STEAM_0:1:19027173" 
                "immunity"              "100" 
                "flags"         "acdfm" 
        }
}


No! the flags have not been updated. We expected flags to be "z" here

SourceMod Version: 1.0.3
SourceBans 1.2

History

Updated by Recon _ 167 days ago

This is a weird one.

I don't think that this is a SB bug. By default, the root admin who installs SB is assigned the z flag, so I think this would have come up before. The plugin hasn't changed in a long time. What's with the unknown group errors? Maybe that has something to do with it.

Updated by Procyon Procyon 167 days ago

I was assigned the z flag in the database backend after the installation but the game server did not update the admins.cfg which lead me to investigate this. Apparently the flags field in admins.cfg is not updated if flags are set to a string with less then or equal to 1 character. The unknown group errors are apparently due to use of individual flags instead of setting a group. Setting a group did not solve the problem. It did however output

L 07/22/2008 - 05:31:56: [sourcebans.smx] Admin Procyon (STEAM_0:1:19027173) has 100 immunity
instead of unknown group.

On a side note admin_groups.cfg does not suffer the same update quirks as witnessed with admins.cfg.

Updated by Squirrel Trym 167 days ago

That is a bug that was fixed in the latest SVN.
Download the latest r99 from here:
http://forums.alliedmods.net/showthread.php?p=656020#post656020

See if it solved the problem.

Updated by Procyon Procyon 167 days ago

r99 does not load on sm 1.0.3 stable, assistance required.

L 07/22/2008 - 14:23:40: [SM] Plugin encountered error 25: Call was aborted
L 07/22/2008 - 14:23:40: [SM] Native "SetFailState" reported: SourceBans failed to load, plugins/basebans.smx must be moved to plugins/disabled/basebans.smx
L 07/22/2008 - 14:23:40: [SM] Displaying call stack trace for plugin "sourcebans.smx":
L 07/22/2008 - 14:23:40: [SM]   [0]  Line 1891, D:\Documents\SourceBans\trunk\game_upload\addons\sourcemod\scripting\sourcebans.sp::OnConfigsExecuted()

Updated by Erik Minekus 167 days ago

Uhm. Did you even bother to read the error message? It clearly says:
SourceBans failed to load, plugins/basebans.smx must be moved to plugins/disabled/basebans.smx
Anyway, please download r100 from http://forums.alliedmods.net/showthread.php?p=656528#post656528, there was a serious bug in r99.

Updated by Procyon Procyon 167 days ago

Disregard my last post, the local sourcemod mirror rolled out basebans.smx on all servers. And at first glance I read the error message sourcebans.smx not as basebans.smx

Updated by Procyon Procyon 167 days ago

Confirmed. Problem fixed in r100.

Updated by Erik Minekus 167 days ago

  • Status changed from New to Rejected

Thanks for reporting.

Updated by Olly Ginger 167 days ago

  • % Done changed from 0 to 100

Also available in: Atom PDF