149 if not client.flags & CLIF_CONNECTED: |
149 if not client.flags & CLIF_CONNECTED: |
150 continue |
150 continue |
151 |
151 |
152 for channel in client.channels: |
152 for channel in client.channels: |
153 if channel.get_value ('logchannel', default=False): |
153 if channel.get_value ('logchannel', default=False): |
154 client.write ("PRIVMSG %s :%s" % (channel['name'], line)) |
154 client.write ("PRIVMSG %s :%s" % (channel.get_value ('name'), line)) |
155 |
155 |
156 # |
156 # |
157 # Exception handling |
157 # Exception handling |
158 # |
158 # |
159 def handle_exception(excType, excValue, trace): |
159 def handle_exception(excType, excValue, trace): |
445 commit_trackeruser = find_developer_by_email (commit_email) |
445 commit_trackeruser = find_developer_by_email (commit_email) |
446 committer = commit_trackeruser if commit_trackeruser != '' else commit_author |
446 committer = commit_trackeruser if commit_trackeruser != '' else commit_author |
447 |
447 |
448 for irc_client in g_clients: |
448 for irc_client in g_clients: |
449 for channel in irc_client.cfg['channels']: |
449 for channel in irc_client.cfg['channels']: |
450 if 'btprivate' in channel and channel['btprivate'] == True: |
450 if channel.get_value ('btprivate', False): |
451 irc_client.privmsg (channel['name'], |
451 irc_client.privmsg (channel.get_value ('name'), |
452 "%s: new commit %s by %s: %s" |
452 "%s: new commit %s by %s: %s" |
453 % (repo_name, commit_node, committer, commit_url)) |
453 % (repo_name, commit_node, committer, commit_url)) |
454 |
454 |
455 for line in commit_message.split ('\n'): |
455 for line in commit_message.split ('\n'): |
456 irc_client.privmsg (channel['name'], line) |
456 irc_client.privmsg (channel.get_value ('name'), line) |
457 #fi |
457 #fi |
458 #done |
458 #done |
459 #done |
459 #done |
460 |
460 |
461 num_commits += 1 |
461 num_commits += 1 |
1000 |
1000 |
1001 for channel in self.channels: |
1001 for channel in self.channels: |
1002 if channel.get_value ('btannounce', False): |
1002 if channel.get_value ('btannounce', False): |
1003 if not isprivate or (channel.get_value ('btprivate', False)): |
1003 if not isprivate or (channel.get_value ('btprivate', False)): |
1004 self.write ("PRIVMSG %s :[%s] New issue %s, reported by %s: %s: %s" % \ |
1004 self.write ("PRIVMSG %s :[%s] New issue %s, reported by %s: %s: %s" % \ |
1005 (channel['name'], data['project']['name'], idstring, reporter, |
1005 (channel.get_value ('name'), data['project']['name'], idstring, reporter, |
1006 data['summary'], self.get_ticket_url (idstring))) |
1006 data['summary'], self.get_ticket_url (idstring))) |
1007 #fi |
1007 #fi |
1008 #fi |
1008 #fi |
1009 #done |
1009 #done |
1010 |
1010 |