summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/tracking.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/tracking.py b/modules/tracking.py
index 1a7b300..86b59b7 100644
--- a/modules/tracking.py
+++ b/modules/tracking.py
@@ -383,9 +383,13 @@ class Module:
if msg:
if type(msg) == list:
for i in msg:
- self.irc.msg(channel if not channel == self.irc.nickname else nick.split('!')[0], i.encode('utf-8'))
+ if isinstance(i, unicode):
+ i = i.encode('utf-8')
+ self.irc.msg(channel if not channel == self.irc.nickname else nick.split('!')[0], i)
else:
- self.irc.msg(channel if not channel == self.irc.nickname else nick.split('!')[0], msg.encode('utf-8'))
+ if isinstance(msg, unicode):
+ msg = msg.encode('utf-8')
+ self.irc.msg(channel if not channel == self.irc.nickname else nick.split('!')[0], msg)
else:
self.irc.msg(channel if not channel == self.irc.nickname else nick.split('!')[0], 'No data returned (this is a bug).')