Bitlbee helps act as a bridge from IRC to https://wiki.bitlbee.org/. For example, you can use Bitlbee to connect IRC to Telegram, Discord, or Slack. The core of bitlbee itself is written in C.
First, let's install the package:
$ doas pkg_add bitlbee-3.6p0-libpurple
The developers suggest not installing bitlbee-3.6p0-libpurple-otr if you plan to provide a public bitlbee instance. This is because the encryption provided by OTR (Off-the-Record) is undermined by the fact that the sysadmin can intercept the messages in plaintext. It gives a false sense of security. Moreover, OTR messaging is often broken when the same account is used with other XMPP clients besides bitlbee.
Edit /etc/bitlbee/bitlbee.conf:
RunMode = ForkDaemon User = _bitlbee # Bitlbee will only be bound to localhost on port 6668 DaemonInterface = 127.0.0.1 DaemonPort = 6668 OperPassword = pass123 AllowAccountAdd 1 HostName = example.com
Replace pass123 with your own password. We set bitlbee to be bound to localhost on port 6668, which users of our bouncer will be able to connect to.
To start bitlbee:
$ doas rcctl enable bitlbee $ doas rcctl start bitlbee
Use sm00th's bitlbee-discord plugin. Here is a convenient port provided by namtsui:
$ cvs -d anoncvs@namtsui.com:/cvs checkout -P ports/net/bitlbee-discord/
$ doas pkg_add telegram-purple-1.3.1p2