BigBrotherBot/big-brother-bot

[admin_plugin] 'guest' level commands don't work when using .ini config

Closed this issue · 8 comments

The commands for guests (level 0: !help, !register, !rules) do not work when using the plugin_admin.ini version of the config. They work however when using the .xml version of the config.

That's weird. I'm using ini config files on all my servers and those commands seems to be working... I'll double check in the afternoon

I noticed the same thing with the !xlrid command which also is for level 'guest' in the xlrstats plugin.
Changing the required level to 'user' makes the command available...

You can also notice the effect when looking at the generated autodoc file. Using .ini the 'guest' commands are not listed, using .xml the commands are...

I sent a pull request with a minor fix in XLRstats plugin which should be totally unrelated to this problem. I added also 2 test cases for the !xlrid command and they pass as expected. I didn't test on a live environment yet but I double checked also admin plugin test cases and I can see nothing related to this bug. Do you have a log file showing such commands not working?

Nothing to see in there. It just returns 'Unrecognized command' message, no error in the logs.
I set the !xlrstats command to 'guest' level and here's the result, command no longer available.

141123 16:55:23 CONSOLE '1416758122 say;xxxxxxxxxxxxxxxx;0;[10TR]xlr8or;\x15!xlrstats'
141123 16:55:23 VERBOSE u'Queueing event Say !xlrstats'
141123 16:55:23 VERBOSE 'Parsing event: Say: AdminPlugin'
141123 16:55:23 DEBUG   u'AdminPlugin: OnSay handle 5:"!xlrstats"'
141123 16:55:23 DEBUG   u'AdminPlugin: handle command !xlrstats'
141123 16:55:23 VERBOSE "RCON sending (127.0.0.1:28980) 'tell 0 ^0(^210TR^0)^7: ^8[pm]^7 ^7Unrecognized command xlrstats. Did you'"
141123 16:55:23 VERBOSE 'Parsing event: Say: ChatloggerPlugin'
141123 16:55:23 DEBUG   u'ChatloggerPlugin: ALL, 2490, [10TR]xlr8or, !xlrstats'
141123 16:55:23 DEBUG   u'ChatloggerPlugin: query: INSERT INTO chatlog (msg_time, msg_type, client_id, client_name, client_team, msg) VALUES (1416758123, "ALL", 2490, "[10TR]xlr8or", -1, "!xlrstats")'
141123 16:55:23 DEBUG   'ChatloggerPlugin: rowcount: 1, id:31674'
141123 16:55:23 VERBOSE 'Parsing event: Say: CensorPlugin'
141123 16:55:23 VERBOSE 'Parsing event: Say: SpamcontrolPlugin'
141123 16:55:23 VERBOSE 'Parsing event: Say: ChatPlugin'
141123 16:55:23 VERBOSE "RCON sending (127.0.0.1:28980) 'tell 0 ^3>^7mean !xlrstatus?'"

Can you please highlight the section of the log where B3 is registering commands?

141123 16:55:00 DEBUG   'AdminPlugin: command "xlrstatus (None)" registered with cmd_xlrstatus for level (1, 100)'
141123 16:55:00 DEBUG   'AdminPlugin: command "xlrtopstats (None)" registered with cmd_xlrtopstats for level (2, 100)'
141123 16:55:00 DEBUG   'AdminPlugin: command "xlrid (None)" registered with cmd_xlrid for level (1, 100)'
141123 16:55:00 DEBUG   'AdminPlugin: command "xlrhide (None)" registered with cmd_xlrhide for level (60, 100)'
141123 16:55:00 ERROR   'AdminPlugin: unknown group guest'
141123 16:55:00 ERROR   u"AdminPlugin: could not register command 'xlrstats': bad level/group ('guest'): expecting a level (1, 2, 20, 40, 60, 80, 100) or group keyword (user, reg, mod, admin, fulladmin, senioradmin, superadmin)"

Wait a minute... I'll check my existing groups...

Yep, that was it. I must have missed sql update 1.6 along the line somewhere.
Thanks for your time Daniel...

You're welcome. This actually makes me think that we can make the database procedure automatic in order to avoid further problems in the transiton between 1.9 and 1.10 version