# Discord bridge

This is done via a bot called [Dis4IRC](https://github.com/zachbr/Dis4IRC).
The bot is managed via systemd.

The configuration file mapping Discord channel ids to IRC channel names is `/usr/local/lib/Dis4IRC/config.hocon`.
After making changes to it, restart the service:

```
sudo systemctl restart dis4irc.service
```

If you download a new version of the Jar file, edit the service definition file `/usr/local/lib/Dis4IRC/dis4irc.service` and change the `ExecStart` line, reload the systemd files and restart the service:

```
sudo systemctl daemon-reload
sudo systemctl restart dis4irc.service
```

To check the log, optionally with the `--follow` flag or something like `--since -10min`:

```
sudo journalctl --unit dis4irc.service
```

The bot is run by the `dis4irc` user.
It was created as follows:

```
sudo adduser --system --home /usr/local/lib/Dis4IRC --no-create-home dis4irc
```

The `/usr/local/lib/Dis4IRC` directory and the data files `bridge-data.dat` and `config.hocon` belong to this user.

