summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmodules/head.py2
-rwxr-xr-xmodules/translate.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/modules/head.py b/modules/head.py
index b6767ff..384b8df 100755
--- a/modules/head.py
+++ b/modules/head.py
@@ -168,7 +168,7 @@ def noteuri(phenny, input):
if not hasattr(phenny.bot, 'last_seen_uri'):
phenny.bot.last_seen_uri = {}
phenny.bot.last_seen_uri[input.sender] = uri
-noteuri.rule = r'.*(http://[^<> "\x01]+)[,.]?'
+noteuri.rule = r'.*(http[s]?://[^<> "\x01]+)[,.]?'
noteuri.priority = 'low'
if __name__ == '__main__':
diff --git a/modules/translate.py b/modules/translate.py
index e637d01..d5ae41f 100755
--- a/modules/translate.py
+++ b/modules/translate.py
@@ -46,6 +46,8 @@ def tr(phenny, context):
if input != output:
msg = translate(phrase, input, output)
+ if isinstance(msg, str):
+ msg = msg.decode('utf-8')
if msg:
msg = web.decode(msg) # msg.replace('&#39;', "'")
msg = '"%s" (%s to %s, translate.google.com)' % (msg, input, output)