diff options
author | Sean B. Palmer <http://inamidst.com/sbp/> | 2008-12-28 09:42:48 +0000 |
---|---|---|
committer | Sean B. Palmer <http://inamidst.com/sbp/> | 2008-12-28 09:42:48 +0000 |
commit | f9aff27534df2efe64d50c01864925f6fe4cd746 (patch) | |
tree | be37bc304b69c9f6134672813a7982f7396cfa07 /modules/oblique.py | |
parent | d26fc8d81f88f92eb798e28c49b9990dbc73bc14 (diff) | |
download | bot-f9aff27534df2efe64d50c01864925f6fe4cd746.tar.gz bot-f9aff27534df2efe64d50c01864925f6fe4cd746.tar.bz2 bot-f9aff27534df2efe64d50c01864925f6fe4cd746.zip |
Minor bug fixes.
Diffstat (limited to 'modules/oblique.py')
-rwxr-xr-x | modules/oblique.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/oblique.py b/modules/oblique.py index a680b6d..da07d7b 100755 --- a/modules/oblique.py +++ b/modules/oblique.py @@ -53,9 +53,13 @@ def o(phenny, input): else: command, args = text, '' command = command.lower() + if command == 'service': + msg = o.services.get(args, 'No such service!') + return phenny.reply(msg) + if o.services.has_key(command): - template = o.services[command] - template = template.replace('${args}', urllib.quote(args.encode('utf-8'))) + t = o.services[command] + template = t.replace('${args}', urllib.quote(args.encode('utf-8'))) template = template.replace('${nick}', urllib.quote(input.nick)) uri = template.replace('${sender}', urllib.quote(input.sender)) |