From 12360d302c74f255fb02766539db98b652bb446a Mon Sep 17 00:00:00 2001 From: Vladimir Vitkov Date: Tue, 27 Oct 2015 16:59:56 +0200 Subject: [PATCH] Communication - slack-to-irc bridge bot --- .gitmodules | 3 +++ communication/slack/README.md | 14 ++++++++++++++ communication/slack/bot | 1 + .../config/openfest-slack-to-irc-sync.json | 18 ++++++++++++++++++ communication/slack/config/slack-irc@.service | 12 ++++++++++++ 5 files changed, 48 insertions(+) create mode 100644 .gitmodules create mode 100644 communication/slack/README.md create mode 160000 communication/slack/bot create mode 100644 communication/slack/config/openfest-slack-to-irc-sync.json create mode 100644 communication/slack/config/slack-irc@.service diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1babff8 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "communication/slack/bot"] + path = communication/slack/bot + url = https://github.com/ekmartin/slack-irc diff --git a/communication/slack/README.md b/communication/slack/README.md new file mode 100644 index 0000000..d062c2e --- /dev/null +++ b/communication/slack/README.md @@ -0,0 +1,14 @@ +# Slack sync to IRC +Bot that will do sync between slack and certain slack channnels + +# Prerequisites +nodejs (tested with 0.12) + +npm install -g slack-irc + +# Files +openfest-slack-to-irc-sync.json - config with sensitive information removed +We are using ssl to connect + +slack-irc@.service systemd templated unit so you can run multiple instances +Running multiple slack-irc instances has not been tested diff --git a/communication/slack/bot b/communication/slack/bot new file mode 160000 index 0000000..f005c1f --- /dev/null +++ b/communication/slack/bot @@ -0,0 +1 @@ +Subproject commit f005c1f4536fe47799bc2741ff09730e7fdea891 diff --git a/communication/slack/config/openfest-slack-to-irc-sync.json b/communication/slack/config/openfest-slack-to-irc-sync.json new file mode 100644 index 0000000..fd70dd4 --- /dev/null +++ b/communication/slack/config/openfest-slack-to-irc-sync.json @@ -0,0 +1,18 @@ +[{ + "nickname": "SlackSync", + "server": "marla.ludost.net", + "token": "CHANGE ME", + "channelMapping": { + "private": "private" + "#bulgaria-hall": "#openfest-bulgaria-hall", + "#chamber-hall": "#openfest-chamber-hall", + "#third-hall": "#openfest-third-hall" + }, + "ircOptions": { + "userName": "slacksync", + "realName": "Slack to IRC bidirectional Sync Bot", + "debug": true, + "secure": "true", + "port": 6697 + } +}] diff --git a/communication/slack/config/slack-irc@.service b/communication/slack/config/slack-irc@.service new file mode 100644 index 0000000..2f38fff --- /dev/null +++ b/communication/slack/config/slack-irc@.service @@ -0,0 +1,12 @@ +[Unit] +Description=Slack to IRC sync bot (%i) +After=network.target + +[Service] +User=nobody +Group=nogroup +PrivateTmp=yes +ExecStart=/usr/bin/slack-irc -c /etc/slack-irc/%i.json + +[Install] +WantedBy=multi-user.target