summaryrefslogtreecommitdiffstats
path: root/opt
diff options
context:
space:
mode:
authorSean B. Palmer <http://inamidst.com/sbp/>2008-05-31 11:46:48 +0100
committerSean B. Palmer <http://inamidst.com/sbp/>2008-05-31 11:46:48 +0100
commit68f2036546c286bb864dbc2ade251041bf7e6be9 (patch)
tree739dab7e082b9187674a2cd2ee10afd7c86eae9c /opt
parent87b9866c7c2ebeaa3c1c010176fa3bc24e017300 (diff)
downloadbot-68f2036546c286bb864dbc2ade251041bf7e6be9.tar.gz
bot-68f2036546c286bb864dbc2ade251041bf7e6be9.tar.bz2
bot-68f2036546c286bb864dbc2ade251041bf7e6be9.zip
Fix for Windows, and some more helpful error messages.
Diffstat (limited to 'opt')
-rwxr-xr-xopt/freenode.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/opt/freenode.py b/opt/freenode.py
index f3d285c..7e188f9 100755
--- a/opt/freenode.py
+++ b/opt/freenode.py
@@ -9,7 +9,7 @@ http://inamidst.com/phenny/
def replaced(phenny, input):
command = input.group(1)
- response = {
+ responses = {
'cp': '.cp has been replaced by .u',
'pc': '.pc has been replaced by .u',
'unicode': '.unicode has been replaced by .u',
@@ -22,10 +22,11 @@ def replaced(phenny, input):
'thesaurus': ".thesaurus hasn't been ported to my new codebase yet",
'rates': "moon wanter. moOOoon wanter!",
'web': 'the .web command has been removed; ask sbp for details',
- 'mangle': ".mangle hasn't been ported to my new codebase yet",
'origin': ".origin hasn't been ported to my new codebase yet"
- }[command]
- phenny.reply(response)
+ }
+ try: response = responses[command]
+ except KeyError: return
+ else: phenny.reply(response)
replaced.commands = [
'cp', 'pc', 'unicode', 'compare', 'map', 'acronym', 'img',
'v', 'validate', 'thesaurus', 'rates', 'web', 'mangle', 'origin'