Compare commits
2 Commits
99b40b9e54
...
a1786b3d85
Author | SHA1 | Date | |
---|---|---|---|
a1786b3d85 | |||
4f0bd07b75 |
|
@ -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`
|
Dependencies: `twisted, python-dateutil, wolfram, requests, bs4, pyenchant`
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
Fix the movie table
|
Fix the movie table
|
||||||
Consider re-adding the following modules: `etymology, ip`
|
Consider re-adding the following modules: `etymology, ip`
|
||||||
Consider logging
|
Consider logging
|
||||||
Change `bot.say` to `bot.msg`
|
Change `bot.say` to `bot.msg`
|
||||||
Add CTCP responses
|
Add CTCP responses
|
||||||
More complex versioning
|
More complex versioning
|
||||||
|
Better readme
|
||||||
|
|
|
@ -67,8 +67,8 @@ def findandreplace(bot, trigger):
|
||||||
if trigger.is_privmsg:
|
if trigger.is_privmsg:
|
||||||
return
|
return
|
||||||
|
|
||||||
rule = re.compile(r"(?:(\S+)[:,]\s+)?s\/((?:\\\/|[^/])+)\/((?:\\\/|[^/])*)"\
|
rule = re.compile(r"(\S+)?(?:[:,]\s|^)s\/((?:\\\/|[^/])+)\/((?:\\\/|[^/])*"\
|
||||||
+ r"(?:\/(\S+))?")
|
+ r")(?:\/(\S+))?")
|
||||||
group = rule.search(trigger.group(0))
|
group = rule.search(trigger.group(0))
|
||||||
if not group:
|
if not group:
|
||||||
return
|
return
|
||||||
|
|
|
@ -14,6 +14,8 @@ URI = 'https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains'
|
||||||
def gettld(bot, trigger):
|
def gettld(bot, trigger):
|
||||||
"""Show information about the given Top Level Domain."""
|
"""Show information about the given Top Level Domain."""
|
||||||
word = trigger.group(2).strip()
|
word = trigger.group(2).strip()
|
||||||
|
if not word:
|
||||||
|
return bot.reply("What TLD?")
|
||||||
if " " in word:
|
if " " in word:
|
||||||
return bot.reply("One TLD at a time.")
|
return bot.reply("One TLD at a time.")
|
||||||
if not word.startswith("."):
|
if not word.startswith("."):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user