diff --git a/README.md b/README.md index 6e3a672..05001e5 100755 --- a/README.md +++ b/README.md @@ -3,10 +3,11 @@ It's like Sopel, except rewritten from scratch using Twisted as a base and over Dependencies: `twisted, python-dateutil, wolfram, requests, bs4, pyenchant` -TODO: +TODO: Fix the movie table Consider re-adding the following modules: `etymology, ip` Consider logging Change `bot.say` to `bot.msg` Add CTCP responses More complex versioning +Better readme diff --git a/modules/sed.py b/modules/sed.py index 1acca50..ba7efa4 100755 --- a/modules/sed.py +++ b/modules/sed.py @@ -67,8 +67,8 @@ def findandreplace(bot, trigger): if trigger.is_privmsg: return - rule = re.compile(r"(?:(\S+)[:,]\s+)?s\/((?:\\\/|[^/])+)\/((?:\\\/|[^/])*)"\ - + r"(?:\/(\S+))?") + rule = re.compile(r"(\S+)?(?:[:,]\s|^)s\/((?:\\\/|[^/])+)\/((?:\\\/|[^/])*"\ + + r")(?:\/(\S+))?") group = rule.search(trigger.group(0)) if not group: return diff --git a/modules/tld.py b/modules/tld.py index 7ac2ffe..0f0ee4e 100755 --- a/modules/tld.py +++ b/modules/tld.py @@ -14,6 +14,8 @@ URI = 'https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains' def gettld(bot, trigger): """Show information about the given Top Level Domain.""" word = trigger.group(2).strip() + if not word: + return bot.reply("What TLD?") if " " in word: return bot.reply("One TLD at a time.") if not word.startswith("."):