diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2013-06-13 23:40:27 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2013-06-13 23:40:27 +0200 |
commit | a8ae2721a7b9c3346aa08c3af8e49c3d49a3076b (patch) | |
tree | a72b0b6b464fbf352f5b3b3f49afe6051bcef50d | |
parent | 44dab90003493c75389bd0b614018874c6a671d0 (diff) |
tracking: Simplified usage and added help.
-rw-r--r-- | modules/tracking.py | 11 |
1 files changed, 10 insertions, 1 deletions
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'): |