zulip/templates/zerver/integrations/irc.md

1.7 KiB

Mirror an IRC channel in Zulip!

Install the bridge software

  1. Clone the Zulip API repository, and install its dependencies.

    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.

  2. Activate the virtualenv by running the source command printed at the end of the output of the previous step.

  3. 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, using Generic bot for the bot type. Download the bot's zuliprc configuration file to your computer.

  2. Subscribe the bot to the Zulip stream that will contain the mirror.

  3. Inside the virtualenv you created above, run

    python irc-mirror.py --irc-server=IRC_SERVER --channel=<CHANNEL> --nick-prefix=<NICK> \
    --stream=<STREAM> [--topic=<TOPIC>] \
    --site=<zulip.site> --user=<bot-email> \
    --api-key=<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!

Your Zulip messages may look like:

Your IRC messages may look like: