def __init__(self, username, password, **kwargs): JabberBot.__init__(self, username, password, **kwargs) self.PING_FREQUENCY = 60 self.content_commands = {} self.add_content_commands() self.db = get_db() self.rlock = RLock() self.last_message = {}
def __init__(self, username, password, **kwargs): JabberBot.__init__(self, username, password, **kwargs) self.PING_FREQUENCY = 60 self.content_commands = {} self.add_content_commands() self.db = get_db() self.rlock = RLock() self.last_message = {}
def __init__(self, username, password, host, port): Logger.__init__(self, "server") JabberBot.__init__(self, username, password) self.client = AsyncClient() self.client.connect(host, port) self.players = {} # identifier => JabberPlayer object self._jid2player = {} # jid => JabberPlayer object
def __init__(self, username, password, secret, command_prefix='.', log_handler=None): JabberBot.__init__(self, username, password, command_prefix) self.PING_FREQUENCY = 30 self.__secret = secret self.__authenticated = [] if log_handler: self.log.addHandler(log_handler) self.log.setLevel(logging.INFO)
def __init__(self, bot_owner, username, password): JabberBot.__init__(self, username, password, True) self.owner = bot_owner # create console handler chandler = logging.StreamHandler() # create formatter formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") # add formatter to handler chandler.setFormatter(formatter) # add handler to logger self.log.addHandler(chandler) self.log.setLevel(logging.INFO)
def __init__(self, jid, password, res="main", debug=False, json_output=None): JabberBot.__init__(self, jid, password, res, debug) self.w = Watcher() self.server_ids = [] # enumerate keys of server_list self.last_rotc_update = 0 self.roster = None self.json_output = json_output self.EVENTS = { 'new_game': 'The first player joins a server.', 'game_close': 'The last player leaves a server, or a server which had players is closed.', 'player_change': 'A change in player numbers on a server.', 'new_server': 'A new server was created (any number of players, even 0).', 'server_close': 'A server was closed (even if it had no players)' }
def __init__(self, configFile, create=False, verbose=False): self.config = ConfigObj(configFile) JabberBot.__init__(self, self.config['JABBER']['user'], self.config['JABBER']['passwd']) try: self.db = MySQLdb.connect(host=self.config['MYSQL']['host'], user=self.config['MYSQL']['user'], passwd=self.config['MYSQL']['passwd'], db=self.config['MYSQL']['dbname'], use_unicode=True, charset = "utf8") except MySQLdb.Error, e: print "Error %d: %s" % (e.args[0], e.args[1]) return None
def __init__(self, jid, password, res=None, adminjid=None): """The init function.""" if hasattr(JabberBot, '__init__'): JabberBot.__init__(self, jid, password, res) self.adminjid = adminjid
def __init__(self, username, password, res=None, debug=False, privatedomain=False, acceptownmsgs=False, handlers=None): JabberBot.__init__(self, username, password, res, debug, privatedomain, acceptownmsgs, handlers) self.update_dynamic_plugins()
def __init__(self, username, password, port, server, debug=False): JabberBot.__init__(self, username, password, port=port, server=server, debug=debug)
def __init__(self, username, password): JabberBot.__init__(self, username, password) self.track = { 'file': 'test.mp3' }
def __init__(self, username, password, smsUser, smsPass, waitingTime): JabberBot.__init__(self, username, password) self.blocked = [] self.smsUser = smsUser self.smsPass = smsPass self.waitingTime = waitingTime
def __init__(self, username, password, res=None, debug=False): self.backend = Backend() JabberBot.__init__(self, username, password, res, debug)
def __init__(self, username, password, res=None, debug=False): self.backend = Backend() JabberBot.__init__(self, username, password, res, debug)
def __init__(self, username, password): JabberBot.__init__(self, username, password) self.track = {'file': 'test.mp3'}