From a8ae2721a7b9c3346aa08c3af8e49c3d49a3076b Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Thu, 13 Jun 2013 23:40:27 +0200 Subject: tracking: Simplified usage and added help. --- modules/tracking.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/tracking.py b/modules/tracking.py index a3b7f25..dd4e396 100644 --- a/modules/tracking.py +++ b/modules/tracking.py @@ -397,7 +397,7 @@ class Module: return msg def keyword(self, nick, channel, kw, msg): - usage = 'Usage: !track (start|label TRACKINGNO [LABEL])|(stop|status TRACKINGNO|LABEL)|list|(url TRACKINGNO|LABEL)' + usage = 'Usage: !track (start TRACKINGNO [LABEL])|(stop|status TRACKINGNO|LABEL) - See !track help for full list' args = msg.split() if len(args) < 1: self.irc.msg(channel if not channel == self.irc.nickname else nick.split('!')[0], usage) @@ -421,6 +421,15 @@ class Module: label = ' '.join(args[2:]) elif mode.lower() == 'url': code = ' '.join(args[1:]) if len(args) > 1 else '' + elif mode.lower() == 'help': + self.irc.msg(nick.split('!')[0], ''' +start TRACKINGNO [LABEL] - Start tracking package with optional label (alias: add) +stop TRACKINGNO|LABEL - Stop tracking package given by either tracking number or label +status TRACKINGNO|LABEL - Show status for registered matches, or look up tracking number if no matches (implicitly updates status) +list - List all registered tracking numbers without fetching status +label TRACKINGNO LABEL - Changes the label for the given tracking number +url [TRACKINGNO] - Lists URLs for matches to the corresponding website''') + return msg = None if mode.lower() in ('start', 'add'): -- cgit v1.2.3