From 71f327ec37a4c74868748b90628c71804995f7be Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Fri, 6 Aug 2010 16:57:11 +0200 Subject: tracking: Fixed fetching status on non-added numbers and command-line testing. --- modules/tracking.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/tracking.py b/modules/tracking.py index 82c8db0..d2560cd 100644 --- a/modules/tracking.py +++ b/modules/tracking.py @@ -54,11 +54,11 @@ class Module: def __init__(self, bot): self.setup_db() self.irc = bot - self.irc.register_keyword('!track', self) self.tracking = [] self.lc = LoopingCall(self.lc_callback) if bot: self.lc.start(config.getfloat(cfg_section, 'interval'), False) + self.irc.register_keyword('!track', self) def stop(self): try: @@ -174,7 +174,7 @@ class Module: data = self.track(code) if data: for package in data: - msg.append('\002%s\002 %s - %s' % (data[0], data[1], data[2])) + msg.append('\002%s\002 %s - %s' % (package[0], package[1], package[2].decode('utf8'))) elif code: msg = 'Failed to fetch tracking data for \002%s\002.' % code else: -- cgit v1.2.3