From b6771898758fa192d6aba5efc88f7197f58d3eab Mon Sep 17 00:00:00 2001 From: Andrew Ke Date: Fri, 15 Mar 2019 21:38:28 -0700 Subject: [PATCH] Kanboard integration --- ircbot/plugin/kanboard.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ircbot/plugin/kanboard.py 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))