diff --git a/ircbot/plugin/kanboard.py b/ircbot/plugin/kanboard.py new file mode 100644 index 0000000..0afb628 --- /dev/null +++ b/ircbot/plugin/kanboard.py @@ -0,0 +1,13 @@ +import re + +REGEX = re.compile(r'(?:k#)([0-9]+)') + + +def register(bot): + bot.listen(REGEX.pattern, show_topic) + + +def show_topic(bot, msg): + for topic in REGEX.findall(msg.text): + id = int(topic) + msg.respond('https://ocf.io/k/' + str(id))