In our support boards we aim to provide support for the B3 core in its current state. Older releases of B3 are NOT supported. Check our front page for the latest version. You may post feature requests in our General Discussion board. Modifications and Hacks of the core B3 code are NOT supported.
Before you ask for support: [ Read the Support Instructions ] - More info: [ Full Support Disclaimer ]

You are here: Big Brother Bot ForumSupport ForumsGeneral Usage Support (Moderator: MordyT)feature request (no warning when not allowed to use command(s)
Pages: [1]   Go Down
  Print  
Author Topic: feature request (no warning when not allowed to use command(s)  (Read 341 times) Bookmark and Share
Beta Testers
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD2
Posts: 63
Offline Offline
« on: August 20, 2010, 01:14:27 PM »

Hello all,

I have a new idea for upcoming version of b3,
in the admin plugin, there should be an option to disable auto warning when:
-I use a command i don't have access to.
-I use a command that don't even exists.

I already took a look in the admin.py (i am using 1.3),
i am able to remove it.(not done it yet)
but i think maybe more B3 customers/users may want to use this.

Thank you for your time,
Greets,

Kikker916
Logged

Beta Testers
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD2
Posts: 63
Offline Offline
« Reply #1 on: August 23, 2010, 11:24:31 AM »

I successfully added, the option:

Add in admin.xml (under settings)
Code:
<set name="sufficient_acces_warn">0</set>

Replace in admin.py
Code:
Line 269 (old)
if event.client.authed and event.client.maxLevel < self.config.getint('settings', 'admins_level'):
Line 269 (new)
if event.client.authed and event.client.maxLevel < self.config.getint('settings', 'admins_level') and self.config.getint('settings', 'sufficient_acces_warn') == 1:
-----------
Line 280 (old)
event.client.message(self.getMessage('unknown_command', cmd))
Line 280 & 281 + 282 + 283(new)
if event.client.maxLevel > self.config.getint('settings', 'admins_level') and self.config.getint('settings', 'sufficient_acces_warn') == 1:
          event.client.message(self.getMessage('unknown_command', cmd))
elif event.client.maxLevel > self.config.getint('settings', 'admins_level'):                                 event.client.message(self.getMessage('unknown_command', cmd))
--------
313 (will be 314)(old)
if event.client.maxLevel < self.config.getint('settings', 'admins_level'):
314 (new)
if event.client.maxLevel < self.config.getint('settings', 'admins_level') and self.config.getint('settings', 'sufficient_acces_warn') == 1:
--------
327 (old)
event.client.message('^7You do not have sufficient access to use %s%s' % (self.cmdPrefix, cmd))
327 + 328 (new)
elif self.config.getint('settings', 'sufficient_acces_warn') == 1:
event.client.message('^7You do not have sufficient access to use %s%s' % (self.cmdPrefix, cmd))

What will this do?
If a client don't have access to a command b3 will not react on it,
if the command also does not exist then b3 will not respond,
except if the client is an admin.

1 = on (like original b3),
0 = off (customized)

I uploaded also the modified admin.py from 1.3.3 wich i have changed with this new option.

Greets,
kikker916

P.S.

i hope the b3 development team,
will maybe add this or simular.
in the next b3 release,


[attachment deleted by maintenance]
« Last Edit: August 23, 2010, 11:47:15 AM by kikker916 » Logged
Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3485
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #2 on: August 24, 2010, 02:11:53 PM »

Thanks for your contribution --> http://github.com/courgette/big-brother-bot/commit/78c5caa8ab8956100fe82cd12e4c993ae72f0c66
Logged

Tags: feature request 
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal