diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-08-06 16:57:11 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-08-06 16:57:11 +0200 |
commit | 71f327ec37a4c74868748b90628c71804995f7be (patch) | |
tree | 1c610c9cde07000e862acbb62959824d6177faa1 /modules | |
parent | c38d2737d3d9fd6d41d9ec8eaf901fc04092dadd (diff) |
tracking: Fixed fetching status on non-added numbers and command-line testing.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/tracking.py | 4 |
1 files 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: |