From 29819c7874ca22769a44c58f4e8e451422b8e489 Mon Sep 17 00:00:00 2001 From: nemunaire Date: Sun, 31 Aug 2014 11:08:34 +0200 Subject: [PATCH] Fix private and CTCP responses --- consumer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consumer.py b/consumer.py index 5d41891..b559dd7 100644 --- a/consumer.py +++ b/consumer.py @@ -79,10 +79,10 @@ class MessageConsumer: if type(res.channel) != list: res.channel = [ res.channel ] for channel in res.channel: - if channel != to_server.nick: + if channel is not None and channel != to_server.nick: to_server.write("%s %s :%s" % ("PRIVMSG", channel, res.get_message())) else: - channel = res.sender + channel = res.sender.split("!")[0] to_server.write("%s %s :%s" % ("NOTICE" if res.is_ctcp else "PRIVMSG", channel, res.get_message())) elif res is not None: