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): |
441 commit_trackeruser = find_developer_by_email (commit_email) |
441 commit_trackeruser = find_developer_by_email (commit_email) |
442 committer = commit_trackeruser if commit_trackeruser != '' else commit_author |
442 committer = commit_trackeruser if commit_trackeruser != '' else commit_author |
443 |
443 |
444 for irc_client in g_clients: |
444 for irc_client in g_clients: |
445 for channel in irc_client.cfg['channels']: |
445 for channel in irc_client.cfg['channels']: |
446 if 'btprivate' in channel and channel['btprivate'] == True: |
446 if channel.get_value ('btprivate', False): |
447 irc_client.privmsg (channel['name'], |
447 irc_client.privmsg (channel.get_value ('name'), |
448 "%s: new commit %s by %s: %s" |
448 "%s: new commit %s by %s: %s" |
449 % (repo_name, commit_node, committer, commit_url)) |
449 % (repo_name, commit_node, committer, commit_url)) |
450 |
450 |
451 for line in commit_message.split ('\n'): |
451 for line in commit_message.split ('\n'): |
452 irc_client.privmsg (channel['name'], line) |
452 irc_client.privmsg (channel.get_value ('name'), line) |
453 #fi |
453 #fi |
454 #done |
454 #done |
455 #done |
455 #done |
456 |
456 |
457 num_commits += 1 |
457 num_commits += 1 |
996 |
996 |
997 for channel in self.channels: |
997 for channel in self.channels: |
998 if channel.get_value ('btannounce', False): |
998 if channel.get_value ('btannounce', False): |
999 if not isprivate or (channel.get_value ('btprivate', False)): |
999 if not isprivate or (channel.get_value ('btprivate', False)): |
1000 self.write ("PRIVMSG %s :[%s] New issue %s, reported by %s: %s: %s" % \ |
1000 self.write ("PRIVMSG %s :[%s] New issue %s, reported by %s: %s: %s" % \ |
1001 (channel['name'], data['project']['name'], idstring, reporter, |
1001 (channel.get_value ('name'), data['project']['name'], idstring, reporter, |
1002 data['summary'], self.get_ticket_url (idstring))) |
1002 data['summary'], self.get_ticket_url (idstring))) |
1003 #fi |
1003 #fi |
1004 #fi |
1004 #fi |
1005 #done |
1005 #done |
1006 |
1006 |