summaryrefslogtreecommitdiffstats
path: root/modules/oblique.py
diff options
context:
space:
mode:
authorSean B. Palmer <sbp@aldebaran.local>2012-02-16 17:55:23 +0000
committerSean B. Palmer <sbp@aldebaran.local>2012-02-16 17:55:23 +0000
commit6198b30d76a6e7ce3ba3037f454221cbbc4b0b32 (patch)
tree8af81f74f153e55303773c9a30be0e31abd872be /modules/oblique.py
parentc65639d55f7b897b21af98c522a647917327f6ba (diff)
downloadbot-6198b30d76a6e7ce3ba3037f454221cbbc4b0b32.tar.gz
bot-6198b30d76a6e7ce3ba3037f454221cbbc4b0b32.tar.bz2
bot-6198b30d76a6e7ce3ba3037f454221cbbc4b0b32.zip
Throttle channel joins
Diffstat (limited to 'modules/oblique.py')
-rwxr-xr-xmodules/oblique.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/oblique.py b/modules/oblique.py
index 7bd6718..d93446e 100755
--- a/modules/oblique.py
+++ b/modules/oblique.py
@@ -43,7 +43,9 @@ def service(phenny, input, command, args):
lines = bytes.splitlines()
if not lines:
return phenny.reply("Sorry, the service didn't respond any output.")
- phenny.say(lines[0][:350])
+ try: line = lines[0].encode('utf-8')[:350]
+ except: line = lines[0][:250]
+ phenny.say(line)
def refresh(phenny):
if hasattr(phenny.config, 'services'):