From 7d7a1618e1f94d934446ad5c3b2bd9cbbb1352bd Mon Sep 17 00:00:00 2001 From: sfan5 Date: Thu, 11 Sep 2014 12:25:46 +0200 Subject: [PATCH] Fix !title not recognizing URIs correctly --- title.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/title.py b/title.py index 9498de9..2438c66 100755 --- a/title.py +++ b/title.py @@ -29,19 +29,20 @@ def title(phenny, input): if not m: return phenny.say("No title found.") title = m.group(1).strip() - if len(title) > 100: - title = title[:100] + "[...]" + if len(title) > 150: + title = title[:150] + "[...]" phenny.reply(title) title.commands = ['title'] def noteuri(phenny, input): uri = input.group(1) - phenny.bot.last_seen_uri = uri + setattr(phenny.bot, 'last_seen_uri', uri) -noteuri.rule = r'(https?://[^<> "\x01]+)' +noteuri.rule = r'.*(https?://[^<> "\x01]+).*' noteuri.priority = 'low' noteuri.nohook = True +noteuri.thread = False if __name__ == '__main__': print(__doc__.strip())