Exemplo n.º 1
0
    def startup(self):
        AbstractParser.startup(self)

        # create the 'Server' client
        self.clients.newClient('Server',
                               guid='Server',
                               name='Server',
                               hide=True,
                               pbid='Server',
                               team=b3.TEAM_UNKNOWN)

        if self.config.has_option('moh', 'max_say_line_length'):
            try:
                maxlength = self.config.getint('moh', 'max_say_line_length')
                if maxlength > SAY_LINE_MAX_LENGTH:
                    self.warning(
                        'max_say_line_length cannot be greater than %s' %
                        SAY_LINE_MAX_LENGTH)
                    maxlength = SAY_LINE_MAX_LENGTH
                if maxlength < 20:
                    self.warning(
                        'max_say_line_length is way too short. using default')
                    maxlength = self._settings['line_length']
                self._settings['line_length'] = maxlength
                self._settings['min_wrap_length'] = maxlength
            except Exception, err:
                self.error(
                    'failed to read max_say_line_length setting "%s" : %s' %
                    (self.config.get('moh', 'max_say_line_length'), err))
    def startup(self):
        AbstractParser.startup(self)

        self.saybigqueuelistener = threading.Thread(target=self.saybigqueuelistener)
        self.saybigqueuelistener.setDaemon(True)
        self.saybigqueuelistener.start()

        # add BFBC2 specific commands
        self._commands['messagebig'] = ('admin.yell', '%(message)s', '%(duration)s', 'player', '%(cid)s')
        self._commands['saybig'] = ('admin.yell', '%(message)s', '%(duration)s', 'all')


        # create the 'Server' client
        self.clients.newClient('Server', guid='Server', name='Server', hide=True, pbid='Server', team=b3.TEAM_UNKNOWN, squad=SQUAD_NEUTRAL)
        

        if self.config.has_option('bfbc2', 'max_say_line_length'):
            try:
                maxlength = self.config.getint('bfbc2', 'max_say_line_length')
                if maxlength > SAY_LINE_MAX_LENGTH:
                    self.warning('max_say_line_length cannot be greater than %s' % SAY_LINE_MAX_LENGTH)
                    maxlength = SAY_LINE_MAX_LENGTH
                if maxlength < 20:
                    self.warning('max_say_line_length is way too short. using default')
                    maxlength = self._settings['line_length']
                self._settings['line_length'] = maxlength
                self._settings['min_wrap_length'] = maxlength
            except Exception, err:
                self.error('failed to read max_say_line_length setting "%s" : %s' % (self.config.get('bfbc2', 'max_say_line_length'), err))
Exemplo n.º 3
0
    def startup(self):
        """
        Called after the parser is created before run().
        """
        AbstractParser.startup(self)

        self.saybigqueuelistener = threading.Thread(
            target=self.saybigqueuelistenerworker)
        self.saybigqueuelistener.setDaemon(True)
        self.saybigqueuelistener.start()

        # add BFBC2 specific commands
        self._commands['messagebig'] = ('admin.yell', '%(message)s',
                                        '%(duration)s', 'player', '%(cid)s')
        self._commands['saybig'] = ('admin.yell', '%(message)s',
                                    '%(duration)s', 'all')

        # create the 'Server' client
        self.clients.newClient('Server',
                               guid='Server',
                               name='Server',
                               hide=True,
                               pbid='Server',
                               team=b3.TEAM_UNKNOWN,
                               squad=SQUAD_NEUTRAL)

        self.verbose('gametype: %s, map: %s' %
                     (self.game.gameType, self.game.mapName))
Exemplo n.º 4
0
    def startup(self):
        AbstractParser.startup(self)

        self.saybigqueuelistener = threading.Thread(target=self.saybigqueuelistener)
        self.saybigqueuelistener.setDaemon(True)
        self.saybigqueuelistener.start()

        # add BFBC2 specific commands
        self._commands['messagebig'] = ('admin.yell', '%(message)s', '%(duration)s', 'player', '%(cid)s')
        self._commands['saybig'] = ('admin.yell', '%(message)s', '%(duration)s', 'all')


        # create the 'Server' client
        self.clients.newClient('Server', guid='Server', name='Server', hide=True, pbid='Server', team=b3.TEAM_UNKNOWN, squad=SQUAD_NEUTRAL)
        

        if self.config.has_option('bfbc2', 'max_say_line_length'):
            try:
                maxlength = self.config.getint('bfbc2', 'max_say_line_length')
                if maxlength > SAY_LINE_MAX_LENGTH:
                    self.warning('max_say_line_length cannot be greater than %s' % SAY_LINE_MAX_LENGTH)
                    maxlength = SAY_LINE_MAX_LENGTH
                if maxlength < 20:
                    self.warning('max_say_line_length is way too short. using default')
                    maxlength = self._settings['line_length']
                self._settings['line_length'] = maxlength
                self._settings['min_wrap_length'] = maxlength
            except Exception, err:
                self.error('failed to read max_say_line_length setting "%s" : %s' % (self.config.get('bfbc2', 'max_say_line_length'), err))
Exemplo n.º 5
0
 def startup(self):
     """
     Called after the parser is created before run().
     """
     AbstractParser.startup(self)
     self.clients.newClient('Server',
                            guid='Server',
                            name='Server',
                            hide=True,
                            pbid='Server',
                            team=b3.TEAM_UNKNOWN)
Exemplo n.º 6
0
    def startup(self):
        AbstractParser.startup(self)
        
        # create the 'Server' client
        self.clients.newClient('Server', guid='Server', name='Server', hide=True, pbid='Server', team=b3.TEAM_UNKNOWN)

        if self.config.has_option('moh', 'max_say_line_length'):
            try:
                maxlength = self.config.getint('moh', 'max_say_line_length')
                if maxlength > SAY_LINE_MAX_LENGTH:
                    self.warning('max_say_line_length cannot be greater than %s' % SAY_LINE_MAX_LENGTH)
                    maxlength = SAY_LINE_MAX_LENGTH
                if maxlength < 20:
                    self.warning('max_say_line_length is way too short. using default')
                    maxlength = self._settings['line_length']
                self._settings['line_length'] = maxlength
                self._settings['min_wrap_length'] = maxlength
            except Exception, err:
                self.error('failed to read max_say_line_length setting "%s" : %s' % (self.config.get('moh', 'max_say_line_length'), err))
Exemplo n.º 7
0
    def startup(self):
        """
        Called after the parser is created before run().
        """
        AbstractParser.startup(self)

        self.saybigqueuelistener = threading.Thread(target=self.saybigqueuelistenerworker)
        self.saybigqueuelistener.setDaemon(True)
        self.saybigqueuelistener.start()

        # add BFBC2 specific commands
        self._commands['messagebig'] = ('admin.yell', '%(message)s', '%(duration)s', 'player', '%(cid)s')
        self._commands['saybig'] = ('admin.yell', '%(message)s', '%(duration)s', 'all')

        # create the 'Server' client
        self.clients.newClient('Server', guid='Server', name='Server', hide=True,
                               pbid='Server', team=b3.TEAM_UNKNOWN, squad=SQUAD_NEUTRAL)

        self.verbose('gametype: %s, map: %s' %(self.game.gameType, self.game.mapName))
Exemplo n.º 8
0
 def startup(self):
     """
     Called after the parser is created before run().
     """
     AbstractParser.startup(self)
     self.clients.newClient('Server', guid='Server', name='Server', hide=True, pbid='Server', team=b3.TEAM_UNKNOWN)