bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def infix_to_prefix(expr): """converts the infix expression to prefix using the shunting yard algorithm""" ops = [] results = [] for token in tokenize(expr): #print ops, results if is_op(token): #If the token is an operator, o1, then: #while there is an operator token, o2, at the top of the stack, and #either o1 is lef...
def infix_to_prefix(expr): """converts the infix expression to prefix using the shunting yard algorithm""" ops = [] results = [] for token in tokenize(expr): #print ops, results if is_op(token): #If the token is an operator, o1, then: #while there is an operator token, o2, at the top of the stack, and #either o1 is lef...
473,400
def get(self, obj, field, context=None): """ """ v = obj.Schema().getField(field).get(obj, mimetype="text/plain") return v
def get(self, obj, field, context=None): """ """ v = obj.Schema().getField(field).getRaw(obj) return v
473,401
def get(self, obj, field, context=None, zip=None, parent_path=''): """ """ f = obj.Schema().getField(field).get(obj) if not f : return '' else: filename = f.filename if zip is not None: #logger.error(obj.Schema().getField(field).getType()) if obj.Schema().getField(field).getType() in \ ("plone.app.blob.subtypes.file.Ex...
def get(self, obj, field, context=None, zip=None, parent_path=''): """ """ f = obj.Schema().getField(field).get(obj) if not f : return '' else: filename = f.filename if zip is not None: #logger.error(obj.Schema().getField(field).getType()) if obj.Schema().getField(field).getType() in \ ("plone.app.blob.subtypes.file.Ex...
473,402
def importObject(self, row, specific_fields, type, conflict_winner, export_date, wf_transition, zip, encoding='utf-8', ignore_content_errors=False, plain_format=False): """ """ modified = False is_new_object = False protected = True parent_path = row[0] id = row[1] type_class = row[2] if parent_path == "": container = ...
def importObject(self, row, specific_fields, type, conflict_winner, export_date, wf_transition, zip, encoding='utf-8', ignore_content_errors=False, plain_format=False): """ """ modified = False is_new_object = False protected = True parent_path = row[0] id = row[1] type_class = row[2] if parent_path == "": container = ...
473,403
def importObject(self, row, specific_fields, type, conflict_winner, export_date, wf_transition, zip, encoding='utf-8', ignore_content_errors=False, plain_format=False): """ """ modified = False is_new_object = False protected = True parent_path = row[0] id = row[1] type_class = row[2] if parent_path == "": container = ...
def importObject(self, row, specific_fields, type, conflict_winner, export_date, wf_transition, zip, encoding='utf-8', ignore_content_errors=False, plain_format=False): """ """ modified = False is_new_object = False protected = True parent_path = row[0] id = row[1] type_class = row[2] if parent_path == "": container = ...
473,404
def importObject(self, row, specific_fields, type, conflict_winner, export_date, wf_transition, zip, encoding='utf-8', ignore_content_errors=False, plain_format=False): """ """ modified = False is_new_object = False protected = True parent_path = row[0] id = row[1] type_class = row[2] if parent_path == "": container = ...
def importObject(self, row, specific_fields, type, conflict_winner, export_date, wf_transition, zip, encoding='utf-8', ignore_content_errors=False, plain_format=False): """ """ modified = False is_new_object = False protected = True parent_path = row[0] id = row[1] type_class = row[2] if parent_path == "": container = ...
473,405
def importObject(self, row, specific_fields, type, conflict_winner, export_date, wf_transition, zip, encoding='utf-8', ignore_content_errors=False, plain_format=False): """ """ modified = False is_new_object = False protected = True parent_path = row[0] id = row[1] type_class = row[2] if parent_path == "": container = ...
def importObject(self, row, specific_fields, type, conflict_winner, export_date, wf_transition, zip, encoding='utf-8', ignore_content_errors=False, plain_format=False): """ """ modified = False is_new_object = False protected = True parent_path = row[0] id = row[1] type_class = row[2] if parent_path == "": container = ...
473,406
def importObject(self, row, specific_fields, type, conflict_winner, export_date, wf_transition, zip, encoding='utf-8', ignore_content_errors=False, plain_format=False): """ """ modified = False is_new_object = False protected = True parent_path = row[0] id = row[1] type_class = row[2] if parent_path == "": container = ...
def importObject(self, row, specific_fields, type, conflict_winner, export_date, wf_transition, zip, encoding='utf-8', ignore_content_errors=False, plain_format=False): """ """ modified = False is_new_object = False protected = True parent_path = row[0] id = row[1] type_class = row[2] if parent_path == "": container = ...
473,407
def get(self, obj, field, context=None, zip=None, parent_path=''): """ """ f = obj.Schema().getField(field).get(obj) if not f : return '' else: filename = f.filename if zip is not None: #logger.error(obj.Schema().getField(field).getType()) if obj.Schema().getField(field).getType() in \ ("plone.app.blob.subtypes.file.Ex...
def get(self, obj, field, context=None, zip=None, parent_path=''): """ """ f = obj.Schema().getField(field).get(obj) if not f : return '' else: filename = f.filename if zip is not None: #logger.error(obj.Schema().getField(field).getType()) if obj.Schema().getField(field).getType() in \ ("plone.app.blob.subtypes.file.Ex...
473,408
def subscribe_user_to_discussion(recID, uid): """ Subscribe a user to a discussion, so the she receives by emails all new new comments for this record. @param recID: record ID corresponding to the discussion we want to subscribe the user @param uid: user id """ query = """INSERT INTO cmtSUBSCRIPTION (id_bibrec, id_use...
def subscribe_user_to_discussion(recID, uid): """ Subscribe a user to a discussion, so the she receives by emails all new new comments for this record. @param recID: record ID corresponding to the discussion we want to subscribe the user @param uid: user id """ query = """INSERT INTO cmtSUBSCRIPTION (id_bibrec, id_use...
473,409
def subscribe_user_to_discussion(recID, uid): """ Subscribe a user to a discussion, so the she receives by emails all new new comments for this record. @param recID: record ID corresponding to the discussion we want to subscribe the user @param uid: user id """ query = """INSERT INTO cmtSUBSCRIPTION (id_bibrec, id_use...
def subscribe_user_to_discussion(recID, uid): """ Subscribe a user to a discussion, so the she receives by emails all new new comments for this record. @param recID: record ID corresponding to the discussion we want to subscribe the user @param uid: user id """ query = """INSERT INTO cmtSUBSCRIPTION (id_bibrec, id_use...
473,410
def calculate_start_date(display_since): """ Private function Returns the datetime of display_since argument in MYSQL datetime format calculated according to the local time. @param display_since: = all= no filtering nd = n days ago nw = n weeks ago nm = n months ago ny = n years ago where n is a single digit number @r...
def calculate_start_date(display_since): """ Private function Returns the datetime of display_since argument in MYSQL datetime format calculated according to the local time. @param display_since: = all= no filtering nd = n days ago nw = n weeks ago nm = n months ago ny = n years ago where n is a single digit number @r...
473,411
def calculate_start_date(display_since): """ Private function Returns the datetime of display_since argument in MYSQL datetime format calculated according to the local time. @param display_since: = all= no filtering nd = n days ago nw = n weeks ago nm = n months ago ny = n years ago where n is a single digit number @r...
def calculate_start_date(display_since): """ Private function Returns the datetime of display_since argument in MYSQL datetime format calculated according to the local time. @param display_since: = all= no filtering nd = n days ago nw = n weeks ago nm = n months ago ny = n years ago where n is a single digit number @r...
473,412
def test_decode_dict(self): s = "abcdefghijklmnopqrstuvwxyz1234567890" d = dict(zip(s, [1234]*len(s))) self.assertEqual(rencode.loads(rencode.dumps(d)), d)
def test_decode_dict(self): s = "abcdefghijklmnopqrstuvwxyz1234567890" d = dict(zip(s, [1234]*len(s))) self.assertEqual(rencode.loads(rencode.dumps(d)), d)
473,413
def get_worker_instances( self ): instances = [] if self.app.TESTFLAG is True: # for i in range(5): # instance = Instance( self.app, inst=None, m_state="Pending" ) # instance.id = "WorkerInstance" # instances.append(instance) return instances log.debug("Trying to discover any worker instances associated wit...
def get_worker_instances( self ): instances = [] if self.app.TESTFLAG is True: # for i in range(5): # instance = Instance( self.app, inst=None, m_state="Pending" ) # instance.id = "WorkerInstance" # instances.append(instance) return instances log.debug("Trying to discover any worker instances associated wit...
473,414
def manage_galaxy( self, to_be_started=True ): if self.app.TESTFLAG is True: log.debug( "Attempted to manage Galaxy, but TESTFLAG is set." ) return os.putenv( "GALAXY_HOME", self.galaxy_home ) os.putenv( "TEMP", '/mnt/galaxyData/tmp' ) if to_be_started: self.status() if not self.configured: log.info( "Setting up Galaxy...
def manage_galaxy( self, to_be_started=True ): if self.app.TESTFLAG is True: log.debug( "Attempted to manage Galaxy, but TESTFLAG is set." ) return os.putenv( "GALAXY_HOME", self.galaxy_home ) os.putenv( "TEMP", '/mnt/galaxyData/tmp' ) if to_be_started: self.status() if not self.configured: log.info( "Setting up Galaxy...
473,415
def manage_galaxy( self, to_be_started=True ): if self.app.TESTFLAG is True: log.debug( "Attempted to manage Galaxy, but TESTFLAG is set." ) return os.putenv( "GALAXY_HOME", self.galaxy_home ) os.putenv( "TEMP", '/mnt/galaxyData/tmp' ) if to_be_started: self.status() if not self.configured: log.info( "Setting up Galaxy...
def if os.path.exists('/mnt/galaxyIndices/locfiles/sam_fa_indices.loc'): shutil.copy('/mnt/galaxyIndices/locfiles/sam_fa_indices.loc', '/mnt/galaxyTools/galaxy-central/tool-data/sam_fa_indices.loc') manage_galaxy( if os.path.exists('/mnt/galaxyIndices/locfiles/sam_fa_indices.loc'): shutil.copy('/mnt/galaxyIndices/locfi...
473,416
def manage_galaxy( self, to_be_started=True ): if self.app.TESTFLAG is True: log.debug( "Attempted to manage Galaxy, but TESTFLAG is set." ) return os.putenv( "GALAXY_HOME", self.galaxy_home ) os.putenv( "TEMP", '/mnt/galaxyData/tmp' ) if to_be_started: self.status() if not self.configured: log.info( "Setting up Galaxy...
def manage_galaxy( self, to_be_started=True ): if self.app.TESTFLAG is True: log.debug( "Attempted to manage Galaxy, but TESTFLAG is set." ) return os.putenv( "GALAXY_HOME", self.galaxy_home ) os.putenv( "TEMP", '/mnt/galaxyData/tmp' ) if to_be_started: self.status() if not self.configured: log.info( "Setting up Galaxy...
473,417
def manage_galaxy( self, to_be_started=True ): if self.app.TESTFLAG is True: log.debug( "Attempted to manage Galaxy, but TESTFLAG is set." ) return os.putenv( "GALAXY_HOME", self.galaxy_home ) os.putenv( "TEMP", '/mnt/galaxyData/tmp' ) if to_be_started: self.status() if not self.configured: log.info( "Setting up Galaxy...
def manage_galaxy( self, to_be_started=True ): if self.app.TESTFLAG is True: log.debug( "Attempted to manage Galaxy, but TESTFLAG is set." ) return os.putenv( "GALAXY_HOME", self.galaxy_home ) os.putenv( "TEMP", '/mnt/galaxyData/tmp' ) if to_be_started: self.status() if not self.configured: log.info( "Setting up Galaxy...
473,418
def instance_state_json(self, trans, no_json=False): g_s = self.app.manager.get_services('Galaxy') if g_s and g_s[0].state == service_states.RUNNING: dns = 'http://%s' % str( self.app.cloud_interface.get_self_public_ip() ) else: # dns = '<a href="http://%s" target="_blank">Access Galaxy</a>' % str( 'localhost:8080' ) d...
def instance_state_json(self, trans, no_json=False): g_s = self.app.manager.get_services('Galaxy') if g_s and g_s[0].state == service_states.RUNNING: dns = 'http://%s' % str( self.app.cloud_interface.get_self_public_ip() ) else: # dns = '<a href="http://%s" target="_blank">Access Galaxy</a>' % str( 'localhost:8080' ) d...
473,419
def update_galaxy(self, trans, repository="http://bitbucket.org/galaxy/cloudman"): log.debug("Updating Galaxy... Using repository %s" % repository) svcs = self.app.manager.get_services('Galaxy') for service in svcs: service.remove() misc.run('su galaxy -c "cd %s; hg pull %s --update"' % (paths.P_GALAXY_HOME, repository...
def update_galaxy(self, trans, repository="http://bitbucket.org/galaxy/galaxy-central"): log.debug("Updating Galaxy... Using repository %s" % repository) svcs = self.app.manager.get_services('Galaxy') for service in svcs: service.remove() misc.run('su galaxy -c "cd %s; hg pull %s --update"' % (paths.P_GALAXY_HOME, repo...
473,420
def update_galaxy(self, trans, repository="http://bitbucket.org/galaxy/cloudman"): log.debug("Updating Galaxy... Using repository %s" % repository) svcs = self.app.manager.get_services('Galaxy') for service in svcs: service.remove() misc.run('su galaxy -c "cd %s; hg pull %s --update"' % (paths.P_GALAXY_HOME, repository...
def update_galaxy(self, trans, repository="http://bitbucket.org/galaxy/cloudman"): log.debug("Updating Galaxy... Using repository %s" % repository) svcs = self.app.manager.get_services('Galaxy') for service in svcs: service.remove() cmd = '%s - galaxy -c "cd %s; hg --config ui.merge=internal:local pull %s --update"' % ...
473,421
def update_galaxy(self, trans, repository="http://bitbucket.org/galaxy/cloudman"): log.debug("Updating Galaxy... Using repository %s" % repository) svcs = self.app.manager.get_services('Galaxy') for service in svcs: service.remove() misc.run('su galaxy -c "cd %s; hg pull %s --update"' % (paths.P_GALAXY_HOME, repository...
def update_galaxy(self, trans, repository="http://bitbucket.org/galaxy/cloudman"): log.debug("Updating Galaxy... Using repository %s" % repository) svcs = self.app.manager.get_services('Galaxy') for service in svcs: service.remove() misc.run('su galaxy -c "cd %s; hg pull %s --update"' % (paths.P_GALAXY_HOME, repository...
473,422
def admin(self, trans): return """ <ul> <li>This admin panel is only a very temporary way to control galaxy services. Use with caution.</li> <li><strong>Service Control</strong></li> <li><a href='manage_galaxy'>Start Galaxy</a></li> <li><a href='manage_galaxy?to_be_started=False'>Stop Galaxy</a></li> <form action="upd...
def admin(self, trans): return """ <ul> <li>This admin panel is only a very temporary way to control galaxy services. Use with caution.</li> <li><strong>Service Control</strong></li> <li><a href='manage_galaxy'>Start Galaxy</a></li> <li><a href='manage_galaxy?to_be_started=False'>Stop Galaxy</a></li> <form action="upd...
473,423
def add_instances( self, num_nodes, instance_type=''): num_nodes = int( num_nodes ) ec2_conn = self.app.cloud_interface.get_ec2_connection() log.info( "Adding %s instance(s)..." % num_nodes ) # Compose worker instance user data worker_ud = {} worker_ud['access_key'] = self.app.ud['access_key'] worker_ud['secret_key'] =...
def add_instances( self, num_nodes, instance_type=''): num_nodes = int( num_nodes ) ec2_conn = self.app.cloud_interface.get_ec2_connection() log.info( "Adding %s instance(s)..." % num_nodes ) # Compose worker instance user data worker_ud = {} worker_ud['access_key'] = self.app.ud['access_key'] worker_ud['secret_key'] =...
473,424
def update_users_CM(self, trans): self.app.manager.update_users_CM() return trans.fill_template('index.mako')
def update_users_CM(self, trans): return to_json_string({'updated':self.app.manager.update_users_CM()})
473,425
def get_CM_url(self, trans): CM_url = trans.app.config.get( "CM_url", "http://bitbucket.org/galaxy/cloudman/changesets/" ) changesets = self.app.manager.check_for_new_version_of_CM() if changesets.has_key('default_CM_rev') and changesets.has_key('user_CM_rev'): try: num_changes = int(changesets['default_CM_rev']) - int...
def get_CM_url(self, trans): changesets = self.app.manager.check_for_new_version_of_CM() if changesets.has_key('default_CM_rev') and changesets.has_key('user_CM_rev'): try: num_changes = int(changesets['default_CM_rev']) - int(changesets['user_CM_rev']) CM_url += changesets['default_CM_rev'] + '/' + str(num_changes) ex...
473,426
def get_CM_url(self, trans): CM_url = trans.app.config.get( "CM_url", "http://bitbucket.org/galaxy/cloudman/changesets/" ) changesets = self.app.manager.check_for_new_version_of_CM() if changesets.has_key('default_CM_rev') and changesets.has_key('user_CM_rev'): try: num_changes = int(changesets['default_CM_rev']) - int...
def get_CM_url(self, trans): CM_url = trans.app.config.get( "CM_url", "http://bitbucket.org/galaxy/cloudman/changesets/" ) changesets = self.app.manager.check_for_new_version_of_CM() if changesets.has_key('default_CM_rev') and changesets.has_key('user_CM_rev'): try: num_changes = int(changesets['default_CM_rev']) - int...
473,427
def instance_state_json(self, trans, no_json=False): g_s = self.app.manager.get_services('Galaxy') if g_s and g_s[0].state == service_states.RUNNING: dns = 'http://%s' % str( self.app.cloud_interface.get_self_public_ip() ) else: # dns = '<a href="http://%s" target="_blank">Access Galaxy</a>' % str( 'localhost:8080' ) d...
def instance_state_json(self, trans, no_json=False): g_s = self.app.manager.get_services('Galaxy') if g_s and g_s[0].state == service_states.RUNNING: dns = 'http://%s' % str( self.app.cloud_interface.get_self_public_ip() ) else: # dns = '<a href="http://%s" target="_blank">Access Galaxy</a>' % str( 'localhost:8080' ) d...
473,428
def instance_state_json(self, trans, no_json=False): g_s = self.app.manager.get_services('Galaxy') if g_s and g_s[0].state == service_states.RUNNING: dns = 'http://%s' % str( self.app.cloud_interface.get_self_public_ip() ) else: # dns = '<a href="http://%s" target="_blank">Access Galaxy</a>' % str( 'localhost:8080' ) d...
def instance_state_json(self, trans, no_json=False): g_s = self.app.manager.get_services('Galaxy') if g_s and g_s[0].state == service_states.RUNNING: dns = 'http://%s' % str( self.app.cloud_interface.get_self_public_ip() ) else: # dns = '<a href="http://%s" target="_blank">Access Galaxy</a>' % str( 'localhost:8080' ) d...
473,429
def __init__(self, owner_bot, xmpp_room_jid, irc_room, irc_server, mode, say_level, irc_port=6667, irc_connection_interval=None, irc_charsets=None): """Create a new bridge.""" self.bot = owner_bot self.irc_server = irc_server self.irc_port = irc_port self.irc_room = irc_room.lower() self.irc_connection_interval = irc_c...
def __init__(self, owner_bot, xmpp_room_jid, irc_room, irc_server, mode, say_level, irc_port=6667, irc_connection_interval=None, irc_charsets=None): """Create a new bridge.""" self.bot = owner_bot self.irc_server = irc_server self.irc_port = irc_port self.irc_room = irc_room.lower() self.irc_connection_interval = irc_c...
473,430
def _say_on_irc(self, message): try: self.irc_connection.privmsg(self.irc_room, message) except ServerNotConnectedError: bridges = self.bot.iter_bridges(irc_server=self.irc_server) self.bot.restart_bridges_delayed(bridges, 0, say_levels.error, 'Lost bot IRC connection', protocol='irc')
def _say_on_irc(self, message): try: self.irc_connection.privmsg(self.irc_room, message) except irclib.ServerNotConnectedError: bridges = self.bot.iter_bridges(irc_server=self.irc_server) self.bot.restart_bridges_delayed(bridges, 0, say_levels.error, 'Lost bot IRC connection', protocol='irc')
473,431
def process_forever(self, timeout=0.2): """Run an infinite loop, processing data from connections.
def process_forever(self, timeout=0.2): """Run an infinite loop, processing data from connections.
473,432
def process_data(self): """[Internal]"""
def process_data(self): """[Internal]"""
473,433
def process_data(self): """[Internal]"""
def process_data(self): """[Internal]"""
473,434
def process_data(self): """[Internal]"""
def process_data(self): """[Internal]"""
473,435
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,436
def _irc_nick_callback(self, error, arguments=None): if not error: if not self.mode: return self.irc_connection.join(self.irc_room, callback=self._irc_join_callback) else: self.mode = None self.say(say_levels.error, 'failed to connect to the IRC chan, leaving ...', on_irc=False) if error in ['nicknameinuse', 'nickcoll...
def _irc_nick_callback(self, error, arguments=None): if not error: if self.stopped: return self.irc_connection.join(self.irc_room, callback=self._irc_join_callback) else: self.mode = None self.say(say_levels.error, 'failed to connect to the IRC chan, leaving ...', on_irc=False) if error in ['nicknameinuse', 'nickcolli...
473,437
def _irc_nick_callback(self, error, arguments=None): if not error: if not self.mode: return self.irc_connection.join(self.irc_room, callback=self._irc_join_callback) else: self.mode = None self.say(say_levels.error, 'failed to connect to the IRC chan, leaving ...', on_irc=False) if error in ['nicknameinuse', 'nickcoll...
def _irc_nick_callback(self, error, arguments=None): if not error: if not self.mode: return self.irc_connection.join(self.irc_room, callback=self._irc_join_callback) else: self.stopped = True self.say(say_levels.error, 'failed to connect to the IRC chan, leaving ...', on_irc=False) if error in ['nicknameinuse', 'nickc...
473,438
def _xmpp_join_callback(self, errors): """Called by muc._xmpp_presence_handler""" if len(errors) == 0: self.reconnecting = False if not self.mode: return self.bot.error(3, 'succesfully connected on XMPP side of bridge "'+str(self)+'"', debug=True) self.say(say_levels.notice, 'bridge "'+str(self)+'" is running in '+self...
def _xmpp_join_callback(self, errors): """Called by muc._xmpp_presence_handler""" if len(errors) == 0: self.reconnecting = False if self.stopped: return self.bot.error(3, 'succesfully connected on XMPP side of bridge "'+str(self)+'"', debug=True) self.say(say_levels.notice, 'bridge "'+str(self)+'" is running in '+self....
473,439
def _xmpp_join_callback(self, errors): """Called by muc._xmpp_presence_handler""" if len(errors) == 0: self.reconnecting = False if not self.mode: return self.bot.error(3, 'succesfully connected on XMPP side of bridge "'+str(self)+'"', debug=True) self.say(say_levels.notice, 'bridge "'+str(self)+'" is running in '+self...
def _xmpp_join_callback(self, errors): """Called by muc._xmpp_presence_handler""" if len(errors) == 0: self.reconnecting = False if not self.mode: return self.bot.error(3, 'succesfully connected on XMPP side of bridge "'+str(self)+'"', debug=True) self.say(say_levels.notice, 'bridge "'+str(self)+'" is running in '+self...
473,440
def _xmpp_message_handler(self, dispatcher, message): """[Internal] Manage XMPP messages.""" xmpp_c = dispatcher._owner if message.getBody() == None: return if message.getType() == 'chat': from_bare_jid = unicode(message.getFrom().getNode()+'@'+message.getFrom().getDomain()) for bridge in self.bridges: if from_bare_...
def _xmpp_message_handler(self, dispatcher, message): """[Internal] Manage XMPP messages.""" xmpp_c = dispatcher._owner if message.getBody() == None: return if message.getType() == 'chat': from_bare_jid = unicode(message.getFrom().getNode()+'@'+message.getFrom().getDomain()) for bridge in self.bridges: if from_bare_...
473,441
def _irc_nick_callback(self, error, arguments=[]): if error == None: if self.mode == None: return self.irc_connection.join(self.irc_room) self.bot.error('===> Debug: successfully connected on IRC side of bridge "'+str(self)+'"', debug=True) self.say('[Notice] bridge "'+str(self)+'" is running in '+self.mode+' mode', on...
def _irc_nick_callback(self, error, arguments=[]): if error == None: if self.mode == None: return self.irc_connection.join(self.irc_room) self.bot.error('===> Debug: successfully connected on IRC side of bridge "'+str(self)+'"', debug=True) self.say('[Notice] bridge "'+str(self)+'" is running in '+self.mode+' mode', on...
473,442
def respond(self, message, participant=None, bot_admin=False): ret = '' command = shlex.split(message) args_array = [] if len(command) > 1: args_array = command[1:] command = command[0] if isinstance(participant, Participant) and bot_admin != participant.bot_admin: bot_admin = participant.bot_admin if command == 'xmp...
def respond(self, message, participant=None, bot_admin=False): ret = '' command = shlex.split(message) args_array = [] if len(command) > 1: args_array = command[1:] command = command[0] if isinstance(participant, Participant) and bot_admin != participant.bot_admin: bot_admin = participant.bot_admin if command == 'xmp...
473,443
def respond(self, message, participant=None, bot_admin=False): ret = '' command = shlex.split(message) args_array = [] if len(command) > 1: args_array = command[1:] command = command[0] if isinstance(participant, Participant) and bot_admin != participant.bot_admin: bot_admin = participant.bot_admin if command == 'xmp...
def respond(self, message, participant=None, bot_admin=False): ret = '' command = shlex.split(message) args_array = [] if len(command) > 1: args_array = command[1:] command = command[0] if isinstance(participant, Participant) and bot_admin != participant.bot_admin: bot_admin = participant.bot_admin if command == 'xmp...
473,444
def respond(self, message, participant=None, bot_admin=False): ret = '' command = shlex.split(message) args_array = [] if len(command) > 1: args_array = command[1:] command = command[0] if isinstance(participant, Participant) and bot_admin != participant.bot_admin: bot_admin = participant.bot_admin if command == 'xmp...
def respond(self, message, participant=None, bot_admin=False): ret = '' command = shlex.split(message) args_array = [] if len(command) > 1: args_array = command[1:] command = command[0] if isinstance(participant, Participant) and bot_admin != participant.bot_admin: bot_admin = participant.bot_admin if command == 'xmp...
473,445
def respond(self, message, participant=None, bot_admin=False): ret = '' command = shlex.split(message) args_array = [] if len(command) > 1: args_array = command[1:] command = command[0] if isinstance(participant, Participant) and bot_admin != participant.bot_admin: bot_admin = participant.bot_admin if command == 'xmp...
def respond(self, message, participant=None, bot_admin=False): ret = '' command = shlex.split(message) args_array = [] if len(command) > 1: args_array = command[1:] command = command[0] if isinstance(participant, Participant) and bot_admin != participant.bot_admin: bot_admin = participant.bot_admin if command == 'xmp...
473,446
def respond(self, message, participant=None, bot_admin=False): ret = '' command = shlex.split(message) args_array = [] if len(command) > 1: args_array = command[1:] command = command[0] if isinstance(participant, Participant) and bot_admin != participant.bot_admin: bot_admin = participant.bot_admin if command == 'xmp...
def respond(self, message, participant=None, bot_admin=False): ret = '' command = shlex.split(message) args_array = [] if len(command) > 1: args_array = command[1:] command = command[0] if isinstance(participant, Participant) and bot_admin != participant.bot_admin: bot_admin = participant.bot_admin if command == 'xmp...
473,447
def _xmpp_join_callback(self, errors): if len(errors) == 0: m = '"'+self.nickname+'" duplicate succesfully created on XMPP side of bridge "'+str(self.bridge)+'"' if self.nickname != self.duplicate_nickname: m += ' using nickname "'+self.duplicate_nickname+'"' self.bridge.say(say_levels.info, '"'+self.nickname+'" will a...
def _xmpp_join_callback(self, errors): if len(errors) == 0: m = '"'+self.nickname+'" duplicate succesfully created on XMPP side of bridge "'+str(self.bridge)+'"' if self.nickname != self.duplicate_nickname: m += ' using nickname "'+self.duplicate_nickname+'"' self.bridge.say(say_levels.info, '"'+self.nickname+'" will a...
473,448
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,449
def send_raw(self, string): """Send raw string to the server.
def send_raw(self, string): """Send raw string to the server.
473,450
def privmsg(self, string): """Send data to DCC peer.
def privmsg(self, string): """Send data to DCC peer.
473,451
def findBridges(self, str_array): # TODO: lock self.bridges for thread safety bridges = [b for b in self.bridges] for bridge in [b for b in bridges]: for s in str_array: if not s in str(bridge): bridges.remove(bridge) break return bridges
def findBridges(self, str_array): # TODO: lock self.bridges for thread safety bridges = [b for b in self.bridges] for bridge in self.bridges: for s in str_array: if not s in str(bridge): bridges.remove(bridge) break return bridges
473,452
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,453
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,454
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,455
def process_once(self, timeout=0): """Process data from connections once.
def process_once(self, timeout=0): """Process data from connections once.
473,456
def send_raw(self, string): """Send raw string to the server.
def send_raw(self, string): """Send raw string to the server.
473,457
def send_raw(self, string): """Send raw string to the server.
def send_raw(self, string): """Send raw string to the server.
473,458
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,459
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,460
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,461
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,462
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,463
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,464
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,465
def addParticipant(self, from_protocol, nickname, real_jid=None, irc_id=None): """Add a participant to the bridge.""" if (from_protocol == 'irc' and nickname == self.bot.nickname) or (from_protocol == 'xmpp' and nickname == self.bot.nickname): self.bot.error(3, 'not adding self ('+self.bot.nickname+') to bridge "'+str(...
def addParticipant(self, from_protocol, nickname, real_jid=None, irc_id=None): """Add a participant to the bridge.""" if (from_protocol == 'irc' and nickname == self.bot.nickname) or (from_protocol == 'xmpp' and nickname == self.bot.nickname): self.bot.error(3, 'not adding self ('+self.bot.nickname+') to bridge "'+str(...
473,466
def addParticipant(self, from_protocol, nickname, real_jid=None, irc_id=None): """Add a participant to the bridge.""" if (from_protocol == 'irc' and nickname == self.bot.nickname) or (from_protocol == 'xmpp' and nickname == self.bot.nickname): self.bot.error(3, 'not adding self ('+self.bot.nickname+') to bridge "'+str(...
def addParticipant(self, from_protocol, nickname, real_jid=None, irc_id=None): """Add a participant to the bridge.""" if (from_protocol == 'irc' and nickname == self.bot.nickname) or (from_protocol == 'xmpp' and nickname == self.bot.nickname): self.bot.error(3, 'not adding self ('+self.bot.nickname+') to bridge "'+str(...
473,467
def _xmpp_join_callback(self, errors): """Called by muc._xmpp_presence_handler""" if len(errors) == 0: if hasattr(self, 'reconnecting'): del self.reconnecting if self.mode == None: return self.bot.error(3, 'succesfully connected on XMPP side of bridge "'+str(self)+'"', debug=True) self.say(say_levels.notice, 'bridge "'...
def _xmpp_join_callback(self, errors): """Called by muc._xmpp_presence_handler""" if len(errors) == 0: self.reconnecting = False if self.mode == None: return self.bot.error(3, 'succesfully connected on XMPP side of bridge "'+str(self)+'"', debug=True) self.say(say_levels.notice, 'bridge "'+str(self)+'" is running in '+...
473,468
def addParticipant(self, from_protocol, nickname, real_jid=None, irc_id=None): """Add a participant to the bridge.""" if (from_protocol == 'irc' and nickname == self.irc_connection.get_nickname()) or (from_protocol == 'xmpp' and nickname == self.xmpp_room.nickname): self.bot.error('===> Debug: not adding self ('+self.b...
def addParticipant(self, from_protocol, nickname, real_jid=None, irc_id=None): """Add a participant to the bridge.""" if (from_protocol == 'irc' and nickname == self.bot.nickname) or (from_protocol == 'xmpp' and nickname == self.bot.nickname): self.bot.error('===> Debug: not adding self ('+self.bot.nickname+') to bridg...
473,469
def restart(self, log=True): """Restart the bridge""" # Stop the bridge self.stop(message='Restarting bridge', log=log) # Recreate the bridge self.init2()
def restart(self, message='Restarting bridge', log=True): """Restart the bridge""" # Stop the bridge self.stop(message='Restarting bridge', log=log) # Recreate the bridge self.init2()
473,470
def restart(self, log=True): """Restart the bridge""" # Stop the bridge self.stop(message='Restarting bridge', log=log) # Recreate the bridge self.init2()
def restart(self, log=True): """Restart the bridge""" # Stop the bridge self.stop(message=message, log=log) # Recreate the bridge self.init2()
473,471
def sayOnIRC(self, message): try: bot_say = False if message[:4] == '/me ': action = True message = message[4:] else: action = False if isinstance(self.irc_connection, ServerConnection): try: if action: self.irc_connection.action(self.bridge.irc_room, message) else: self.irc_connection.privmsg(self.bridge.irc_room, mes...
def sayOnIRC(self, message): bot_say = False if message[:4] == '/me ': action = True message = message[4:] else: action = False if isinstance(self.irc_connection, ServerConnection): try: if action: self.irc_connection.action(self.bridge.irc_room, message) else: self.irc_connection.privmsg(self.bridge.irc_room, message)...
473,472
def sayOnIRC(self, message): try: bot_say = False if message[:4] == '/me ': action = True message = message[4:] else: action = False if isinstance(self.irc_connection, ServerConnection): try: if action: self.irc_connection.action(self.bridge.irc_room, message) else: self.irc_connection.privmsg(self.bridge.irc_room, mes...
def sayOnIRC(self, message): try: bot_say = False if message[:4] == '/me ': action = True message = message[4:] else: action = False if isinstance(self.irc_connection, ServerConnection): try: if action: self.irc_connection.action(self.bridge.irc_room, message) else: self.irc_connection.privmsg(self.bridge.irc_room, mes...
473,473
def sayOnIRCTo(self, to, message): if isinstance(self.irc_connection, ServerConnection): try: self.irc_connection.privmsg(to, message) except EncodingException: self.bridge.say(say_levels.warning, '"'+self.nickname+'" is sending messages using an unknown encoding', log=True) elif not isinstance(self.xmpp_c, xmpp.client...
def sayOnIRCTo(self, to, message): if isinstance(self.irc_connection, ServerConnection): self.irc_connection.privmsg(to, message) elif not isinstance(self.xmpp_c, xmpp.client.Client): if self.bridge.mode != 'normal': self.bridge.getParticipant(to).sayOnXMPPTo(self.nickname, 'Sorry but cross-protocol private messages ar...
473,474
def sayOnXMPP(self, message): try: if isinstance(self.xmpp_c, xmpp.client.Client): self.muc.say(message) elif not isinstance(self.irc_connection, ServerConnection): if message[:4] == '/me ': self.bridge.xmpp_room.say('* '+self.nickname+' '+message[4:]) else: self.bridge.xmpp_room.say('<'+self.nickname+'> '+message) exc...
def sayOnXMPP(self, message): if isinstance(self.xmpp_c, xmpp.client.Client): self.muc.say(message) elif not isinstance(self.irc_connection, ServerConnection): if message[:4] == '/me ': self.bridge.xmpp_room.say('* '+self.nickname+' '+message[4:]) else: self.bridge.xmpp_room.say('<'+self.nickname+'> '+message)
473,475
def sayOnXMPPTo(self, to, message): try: if isinstance(self.xmpp_c, xmpp.client.Client): self.muc.sayTo(to, message) elif not isinstance(self.irc_connection, ServerConnection): if self.bridge.mode != 'normal': self.bridge.getParticipant(to).sayOnXMPPTo(self.nickname, 'Sorry but cross-protocol private messages are disab...
def sayOnXMPPTo(self, to, message): if isinstance(self.xmpp_c, xmpp.client.Client): self.muc.sayTo(to, message) elif not isinstance(self.irc_connection, ServerConnection): if self.bridge.mode != 'normal': self.bridge.getParticipant(to).sayOnXMPPTo(self.nickname, 'Sorry but cross-protocol private messages are disabled i...
473,476
def disconnect(self, message="", volontary=False): """Hang up the connection.
def disconnect(self, message="", volontary=False): """Hang up the connection.
473,477
def disconnect(self, message="", volontary=False): """Hang up the connection.
def disconnect(self, message="", volontary=False): """Hang up the connection.
473,478
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,479
def privmsg(self, target, text): """Send a PRIVMSG command.""" for l in text.split('\n'): l_size = len(l.encode('utf-8')) available_size = float(510-len('%s PRIVMSG %s :' % (self.irc_id, target))) # 510 is the size limit for IRC messages defined in RFC 2812 e = 0 for i in range(math.ceil(l_size/available_size)): s = e...
def privmsg(self, target, text): """Send a PRIVMSG command.""" for l in text.split('\n'): l_size = len(l.encode('utf-8')) available_size = float(510-len('%s PRIVMSG %s :' % (self.irc_id, target))) # 510 is the size limit for IRC messages defined in RFC 2812 e = 0 for i in range(int(math.ceil(l_size/available_size))): ...
473,480
def _xmpp_join_callback(self, errors): """Called by muc._xmpp_presence_handler""" if len(errors) == 0: self.reconnecting = False if not self.mode: return self.bot.error(3, 'succesfully connected on XMPP side of bridge "'+str(self)+'"', debug=True) self.say(say_levels.notice, 'bridge "'+str(self)+'" is running in '+self...
def _xmpp_join_callback(self, errors): """Called by muc._xmpp_presence_handler""" if len(errors) == 0: self.reconnecting = False if not self.mode: return self.bot.error(3, 'succesfully connected on XMPP side of bridge "'+str(self)+'"', debug=True) self.say(say_levels.notice, 'bridge "'+str(self)+'" is running in '+self...
473,481
def part(self, channels, message=""): """Send a PART command.""" try: if isinstance(channels, basestring): try: self.channels[channels].part(message=message) except KeyError: raise UnknownChannel, (channels, message, self) else: for channel in channels: try: self.channels[channel].part(message=message) except KeyError:...
def part(self, channels, message=""): """Send a PART command.""" try: if isinstance(channels, basestring): try: self.channels[channels].part(message=message) except KeyError: raise UnknownChannel, (channels, message, str(self)) else: for channel in channels: try: self.channels[channel].part(message=message) except KeyE...
473,482
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,483
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,484
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,485
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,486
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,487
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,488
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,489
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,490
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,491
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,492
def addParticipant(self, from_protocol, nickname, real_jid=None, irc_id=None): """Add a participant to the bridge.""" if (from_protocol == 'irc' and nickname == self.irc_connection.get_nickname()) or (from_protocol == 'xmpp' and nickname == self.xmpp_room.nickname): self.bot.error('===> Debug: not adding self ('+self.b...
def addParticipant(self, from_protocol, nickname, real_jid=None, irc_id=None): """Add a participant to the bridge.""" if (from_protocol == 'irc' and nickname == self.irc_connection.get_nickname()) or (from_protocol == 'xmpp' and nickname == self.xmpp_room.nickname): self.bot.error('===> Debug: not adding self ('+self.b...
473,493
def respond(self, message, participant=None, bot_admin=False): ret = '' command = shlex.split(message) args_array = [] if len(command) > 1: args_array = command[1:] command = command[0] if isinstance(participant, Participant) and bot_admin != participant.bot_admin: bot_admin = participant.bot_admin if command == 'xmp...
def respond(self, message, participant=None, bot_admin=False): ret = '' command = shlex.split(message) args_array = [] if len(command) > 1: args_array = command[1:] command = command[0] if isinstance(participant, Participant) and bot_admin != participant.bot_admin: bot_admin = participant.bot_admin if command == 'xmp...
473,494
def stop_bot(bot, command, args_array, bridge): bot.stop() return 'Bot stopped.'
def stop_bot(bot, command, args_array, bridge): bot.stop() return
473,495
def disconnect(self, message="", volontary=False): """Hang up the connection.
def disconnect(self, message="", volontary=False): """Hang up the connection.
473,496
def disconnect(self, message="", volontary=False): """Hang up the connection.
def disconnect(self, message="", volontary=False): """Hang up the connection.
473,497
def remove_participant(self, left_protocol, nickname, leave_message): """Remove the participant using nickname from the bridge. Raises a NoSuchParticipantException if nickname is not used in the bridge.""" was_on_both = None p = self.get_participant(nickname) if p.left: self.lock.acquire() self.participants.remove(p)...
def remove_participant(self, left_protocol, nickname, leave_message): """Remove the participant using nickname from the bridge. Raises a NoSuchParticipantException if nickname is not used in the bridge.""" was_on_both = None p = self.get_participant(nickname) if p.left: self.lock.acquire() self.participants.remove(p)...
473,498
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse...
473,499