88 def hook_chanmsg (bot, channel, sender, message, **rest): |
88 def hook_chanmsg (bot, channel, sender, message, **rest): |
89 sourceName = '%s/%s' % (bot.name, channel) |
89 sourceName = '%s/%s' % (bot.name, channel) |
90 |
90 |
91 for dest in Config.get_node('bridges').get_value (sourceName, []): |
91 for dest in Config.get_node('bridges').get_value (sourceName, []): |
92 try: |
92 try: |
|
93 # Stuff some control characters into the name so that this doesn't cause people who |
|
94 # are on both ends of the bridge to highlight themselves |
|
95 # sender = sender[0:len(sender)/2] + (Irc.BoldChar * 2) |
|
96 sender += '_' |
|
97 |
93 clientName, channelName = dest.split ('/') |
98 clientName, channelName = dest.split ('/') |
94 Irc.get_client (clientName).privmsg (channelName, |
99 Irc.get_client (clientName).privmsg (channelName, |
95 '[%s/%s] <%s> %s' % (bot.name, channel, sender, message)) |
100 '[%s/%s] <%s> %s' % (bot.name, channel, sender, message)) |
96 except Exception as e: |
101 except Exception as e: |
97 Irc.broadcast ('Error while bridging from %s to %s: %s' % |
102 Irc.broadcast ('Error while bridging from %s to %s: %s' % |