From 16dece72cb212bb3f010bcf055a235fd4a3dc370 Mon Sep 17 00:00:00 2001 From: "mr.Shu" Date: Sun, 20 Apr 2014 12:19:53 +0200 Subject: [PATCH] fixed irc messages sending --- brutal/protocols/irc.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/brutal/protocols/irc.py b/brutal/protocols/irc.py index 7f63814..04547fa 100644 --- a/brutal/protocols/irc.py +++ b/brutal/protocols/irc.py @@ -402,12 +402,12 @@ def _bot_process_action(self, action): if action.action_type == 'message': body = action.meta.get('body') if body: - dest = action.destination_room - if dest: - if dest[0] == '#': - self.say(dest, body) - else: - self.msg(dest, body) + for dest in action.destination_rooms: + if dest: + if dest[0] == '#': + self.say(dest, body) + else: + self.msg(dest, body) class IrcBotClient(protocol.ReconnectingClientFactory): @@ -485,4 +485,4 @@ def connect(self, *args, **kwargs): reactor.connectTCP(self.server, self.port, self.client) def handle_action(self, action): - self.client.handle_action(action) \ No newline at end of file + self.client.handle_action(action)