summaryrefslogtreecommitdiffstats
path: root/modules/dict.py
diff options
context:
space:
mode:
authorSean B. Palmer <http://inamidst.com/sbp/>2008-04-26 15:54:35 +0100
committerSean B. Palmer <http://inamidst.com/sbp/>2008-04-26 15:54:35 +0100
commit986953131d1e399a9b277984a2234cd0c5f7656c (patch)
treebabe5d30a618c40b059421b43a9ca19b9b1beb14 /modules/dict.py
parent286d4a8497621d2f3c0f1f8d66db60b11c87fad5 (diff)
downloadbot-986953131d1e399a9b277984a2234cd0c5f7656c.tar.gz
bot-986953131d1e399a9b277984a2234cd0c5f7656c.tar.bz2
bot-986953131d1e399a9b277984a2234cd0c5f7656c.zip
Allow the user to configure the port in the config, and other fixes.
Diffstat (limited to 'modules/dict.py')
-rwxr-xr-xmodules/dict.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/dict.py b/modules/dict.py
index 7ecaf0a..61fcee9 100755
--- a/modules/dict.py
+++ b/modules/dict.py
@@ -113,7 +113,10 @@ def dict(phenny, input):
if len(results[key]) > 1:
result += ', 2. ' + results[key][1]
result += '; '
- phenny.say(result.rstrip('; '))
+ result = result.rstrip('; ')
+ if result.endswith('-') and (len(result) < 30):
+ phenny.reply('Sorry, no definition found.')
+ else: phenny.say(result)
dict.commands = ['dict']
if __name__ == '__main__':