Install

Installation

First, install basic dependencies:

# pkg_add libcares gcc
# ln -s /usr/local/bin/egcc /usr/local/bin/gcc

Set up a new user to privsep.

$ doas useradd -m -g=uid -c "psybnc" -d /home/psybnc -s /bin/ksh psybnc
$ doas su psybnc

Note: If your server has an unreliable connection, you may need to apply this patch to increase its tolerance to delay:

--- src/p_server.c.old  Mon Oct 21 18:31:19 2024
+++ src/p_server.c      Mon Oct 21 18:03:30 2024
@@ -1680,7 +1680,7 @@
 }

 #ifndef STONETIME
-#define STONETIME 240
+#define STONETIME 2400
 #endif

 #ifndef STONECHECKDELAY

Install c-ares then build psybnc:

$ cd
$ ftp http://psybnc.org/download/psyBNC-2.4.3.tar.gz
$ tar zxf psyBNC-2.4.3.tar.gz
$ rm psyBNC-2.4.3.tar.gz
$ cd psybnc
$ make

Inside psybnc.conf:

PSYBNC.SYSTEM.PORT1=6667
PSYBNC.SYSTEM.HOST1=*
PSYBNC.SYSTEM.PORT2=6697
PSYBNC.SYSTEM.HOST2=S=*
PSYBNC.HOSTALLOWS.ENTRY0=*;*

Running

$ ./psybnc

See rcd? to add psybnc to system startup.

Usage

When interacting with psybnc

NICK nickname
USER nickname nickname bnc.example.com :nickname

all fields must be filled in -- it checks ident for login

To change nicks on a different network: /nick #ircnow~jrmu

I could not figure out how to send a raw command to a specific network, so I just made ircnow the main network

to send a privmsg to a specific network

/query #network~nickname hello, world!
/query #ircnow~Nickserv identify password

To add a network:

/quote addnetwork network

For no SSL:

/quote addserver network~irc.example.com :6667

For SSL:

/quote addserver network~S=irc.example.com :6697

Be careful, if it defaults to IPv4 and you attempt to connect IPv6, psybnc crashes each and every time you load it