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 ]

Pages: [1]   Go Down
  Print  
Author Topic: !rules acting strangely  (Read 619 times) Bookmark and Share
Jr. Member
**
OS: Windows
Type: Renting Server with B3
Gameservers: BC2
Posts: 44
Offline Offline
« on: July 09, 2010, 03:33:24 PM »

There seems to be something up with the !rules command on my server. For some players, they will immediately be told not to spam commands. For other players, everything works fine. This will happen even if it is the person first time using the command.

I've currently set !rules to require a power of 0, so that even unregistered users can use it. This is set in the plugin_admin.xml file. Any idea why it's acting up?
« Last Edit: July 09, 2010, 04:00:48 PM by Padinn » Logged

Jr. Member
**
OS: Windows
Type: Renting Server with B3
Gameservers: BC2
Posts: 44
Offline Offline
« Reply #1 on: July 09, 2010, 03:33:58 PM »

This is the code as it appears in my admin.py, it's unmodified. I'm guessing its this self.aquireCmdLock thing that's acting up? Could someone explain to me what the cmd,client, 60, true part means?
---------
Code: python
def cmd_rules(self, data, client=None, cmd=None):
       """\
       - say the rules
       """
       if not self.aquireCmdLock(cmd, client, 60, True):
           client.message('^7Do not spam commands')
           return

       m = self.parseUserCmd(data)
       if m:
           if client.maxLevel >= self.config.getint('settings', 'admins_level'):
               sclient = self.findClientPrompt(m[0], client)
               if not sclient:
                   return

               if sclient.maxLevel >= client.maxLevel:
                   client.message('%s ^7already knows the rules' % sclient.exactName)
                   return
               else:
                   client.message('^7Sir, Yes Sir!, spamming rules to %s' % sclient.exactName)
           else:
               client.message('^7Stop trying to spam other players')
               return
       elif cmd.loud:
           thread.start_new_thread(self._sendRules, (None,))
           return
       else:
           sclient = client

       thread.start_new_thread(self._sendRules, (sclient,))

« Last Edit: July 09, 2010, 04:12:56 PM by Courgette » Logged
Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3478
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #2 on: July 09, 2010, 04:11:11 PM »

It would be better to show us part of your b3 log where we can witness a player typing !rules and getting unexpected results
Logged

Jr. Member
**
OS: Windows
Type: Renting Server with B3
Gameservers: BC2
Posts: 44
Offline Offline
« Reply #3 on: July 09, 2010, 04:52:55 PM »

100709 19:13:34   CONSOLE   ['player.onChat', 'Xplicit07', '!rules', 'all']
100709 19:13:34   VERBOSE   Queueing event Say !rules
100709 19:13:34   VERBOSE   Parsing Event: Say: AdminPlugin
100709 19:13:34   DEBUG   AdminPlugin: OnSay handle 5:"!rules"
100709 19:13:34   DEBUG   AdminPlugin: Handle command !rules
100709 19:13:34   DEBUG   getCommand: ('admin.say', '(b3): [pm] Do not spam commands', 'player', 'Xplicit07')
100709 19:13:34   VERBOSE   RCON (1/1) ('admin.say', '(b3): [pm] Do not spam commands', 'player', 'Xplicit07')
100709 19:13:34   VERBOSE   Parsing Event: Say: ChatloggerPlugin
100709 19:13:34   DEBUG   ChatloggerPlugin: ALL, 7730, Xplicit07, !rules
100709 19:13:34   DEBUG   ChatloggerPlugin: query: INSERT INTO chatlog (msg_time, msg_type, client_id, client_name, client_team, msg) VALUES (1278717214, "ALL", 7730, "Xplicit07", 3, "!rules")
100709 19:13:34   DEBUG   ChatloggerPlugin: rowcount: 1, id:27674
100709 19:13:34   CONSOLE   ['player.onChat', 'Server', '(b3): [pm] Do not spam commands', 'player', 'Xplicit07']
Logged
Jr. Member
**
OS: Windows
Type: Renting Server with B3
Gameservers: BC2
Posts: 44
Offline Offline
« Reply #4 on: July 09, 2010, 04:53:34 PM »

That looks pretty normal to me, as I said, some people could see them, other people immediately received the warning not to spam.
Logged
Tags:
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal