summaryrefslogtreecommitdiffstats
path: root/modules/translate.py
diff options
context:
space:
mode:
authorSean B. Palmer <http://inamidst.com/sbp/>2008-03-31 16:17:32 +0100
committerSean B. Palmer <http://inamidst.com/sbp/>2008-03-31 16:17:32 +0100
commit286d4a8497621d2f3c0f1f8d66db60b11c87fad5 (patch)
tree23493e843bcb1a1d6b25346a3dfd6290df46d5ba /modules/translate.py
parentfb2cd452e963b8bc048161036903cd82d3b113f0 (diff)
downloadbot-286d4a8497621d2f3c0f1f8d66db60b11c87fad5.tar.gz
bot-286d4a8497621d2f3c0f1f8d66db60b11c87fad5.tar.bz2
bot-286d4a8497621d2f3c0f1f8d66db60b11c87fad5.zip
New "limit" config variable, and some module fixes.
Diffstat (limited to 'modules/translate.py')
-rwxr-xr-xmodules/translate.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/translate.py b/modules/translate.py
index d90de43..f7cf0a2 100755
--- a/modules/translate.py
+++ b/modules/translate.py
@@ -68,9 +68,10 @@ def translate(phrase, lang, target='en'):
def tr(phenny, input):
"""Translates a phrase, with an optional language hint."""
- input, output, phrase = input.groups()
+ original_input = input
+ input, output, phrase = original_input.groups()
phrase = phrase.encode('utf-8')
- if (len(phrase) > 350) and (not phenny.admin(input.nick)):
+ if (len(phrase) > 350) and (not original_input.admin):
return phenny.reply('Phrase must be under 350 characters.')
input = input or guess_language(phrase)