From 888c84c283fca4a17b0afcd1d8bbd579ee6ffd73 Mon Sep 17 00:00:00 2001 From: rht Date: Wed, 13 Feb 2019 22:10:50 +0000 Subject: [PATCH] IRC integration: Update documentation to recommend the direct bridge. Edited by Rishi to remove the Matrix section. --- templates/zerver/integrations/irc.md | 53 +++++++++++++++++++++---- templates/zerver/integrations/matrix.md | 9 ++++- 2 files changed, 53 insertions(+), 9 deletions(-) diff --git a/templates/zerver/integrations/irc.md b/templates/zerver/integrations/irc.md index a129176d98..81b13ee45a 100644 --- a/templates/zerver/integrations/irc.md +++ b/templates/zerver/integrations/irc.md @@ -1,10 +1,52 @@ Mirror an IRC channel in Zulip! -This integration is powered by the [Zulip Matrix integration](/integrations/doc/matrix). +### Install the bridge software -{!install-matrix.md!} +1. Clone the Zulip API repository, and install its dependencies. -{!configure-matrix-bridge.md!} + ``` + git clone https://github.com/zulip/python-zulip-api.git + cd python-zulip-api + python3 ./tools/provision + ``` + + This will create a new Python virtualenv. You'll run the bridge service + inside this virtualenv. + +1. Activate the virtualenv by running the `source` command printed + at the end of the output of the previous step. + +1. Install the bridge software in your virtualenv, by running: + ``` + pip install -r zulip/integrations/bridge_with_irc/requirements.txt + ``` + +### Configure the bridge + +1. In Zulip, [create a bot](/help/add-a-bot-or-integration), using **Generic bot** + for the bot type. Download the bot's `zuliprc` configuration file to your + computer. + +1. [Subscribe the bot](/help/add-or-remove-users-from-a-stream) to the Zulip + stream that will contain the mirror. + +1. Inside the virtualenv you created above, run + ``` + python irc-mirror.py --irc-server=IRC_SERVER --channel= --nick-prefix= \ + --stream= [--topic=] \ + --site= --user= \ + --api-key= + ``` + + `--topic` is a Zulip topic, is optionally specified, defaults to "IRC". + +Example command: +``` +./irc-mirror.py --irc-server=irc.freenode.net --channel='#python-mypy' --nick-prefix=irc_mirror \ +--stream='test here' --topic='#mypy' \ +--site="https://chat.zulip.org" --user=bot@email.com \ +--api-key=DeaDbEEf +``` **Congratulations! You're done!** @@ -15,8 +57,3 @@ Your Zulip messages may look like: Your IRC messages may look like: ![](/static/images/integrations/irc/002.png) - -**Note**: There are a handful of -[IRC channels](https://github.com/matrix-org/matrix-appservice-irc/wiki/Channels-from-which-the-IRC-bridge-is-banned) -that have temporarily banned the Matrix.org IRC bridge. -You can't currently mirror those channels using this integration. diff --git a/templates/zerver/integrations/matrix.md b/templates/zerver/integrations/matrix.md index c1da96118a..b82b56e118 100644 --- a/templates/zerver/integrations/matrix.md +++ b/templates/zerver/integrations/matrix.md @@ -1,5 +1,12 @@ -Exchange messages between [matrix.org](https://matrix.org) and Zulip! +Exchange messages between [matrix.org](https://matrix.org) and Zulip! If +you're looking to mirror an IRC channel in particular, we recommend our +[direct IRC integration](/integrations/doc/irc). {!install-matrix.md!} {!configure-matrix-bridge.md!} + +**Note**: There are a handful of +[IRC channels](https://github.com/matrix-org/matrix-appservice-irc/wiki/Channels-from-which-the-IRC-bridge-is-banned) +that have temporarily banned the Matrix.org IRC bridge. +You can't currently mirror those channels using this integration.