aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/ircbot/Sourcehut/config.py
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-06-25 13:33:44 +0200
committerRobin Jarry <robin@jarry.cc>2023-07-01 18:26:35 +0200
commit91dbd6078192e017b88bf061bb730e9d16ed5088 (patch)
treeedc2f7fcf65b699cc048b5aa5476afea02ae2aed /contrib/ircbot/Sourcehut/config.py
parent69094e332779a71ddd47b88bced0992c290d67e7 (diff)
downloadaerc-91dbd6078192e017b88bf061bb730e9d16ed5088.tar.gz
contrib: add irc bot stuff
Add a small script to install a sourcehut webhook that triggers on patchset reception. Add a limnoria (supybot fork) plugin to receive the webhook requests and send IRC NOTICE messages on the proper channels. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Bence Ferdinandy <bence@ferdinandy.com>
Diffstat (limited to 'contrib/ircbot/Sourcehut/config.py')
-rw-r--r--contrib/ircbot/Sourcehut/config.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/contrib/ircbot/Sourcehut/config.py b/contrib/ircbot/Sourcehut/config.py
new file mode 100644
index 00000000..38e55427
--- /dev/null
+++ b/contrib/ircbot/Sourcehut/config.py
@@ -0,0 +1,14 @@
+from supybot import conf, registry
+try:
+ from supybot.i18n import PluginInternationalization
+ _ = PluginInternationalization('Sourcehut')
+except:
+ _ = lambda x: x
+
+
+def configure(advanced):
+ from supybot.questions import expect, anything, something, yn
+ conf.registerPlugin('Sourcehut', True)
+
+
+Sourcehut = conf.registerPlugin('Sourcehut')