ref: 7c65a52929d95ad5a4108706bb32c7c7f754b193
dir: /README/
====================================================================== WARNING: This program is still in progress, use it at your own risk. ====================================================================== ticl - tiny irc channel linker ------------------------------ ticl is a very small and simple multi-network irc channel linker. WARNING: If you use this program on networks that you are not allowed then your nick or IP may get banned. This is because this program opens multiple simultaneous connections to the server and most networks have some limit on each IP. Working ------- - A bot named 'linker' joins each given channels and clones each user of its channel on other channels and relays the user's messages received from its channel to the clones on other channels. - If a user on a channel joins(JOIN), quits(QUIT), leaves(PART), or changes their nick(NICK), the linker attempts to emulate the same action with the respective clones on the other channels. - Each clone's nick is followed by the original user's channel symbol (enclosed in square brackets). - If the nick is already taken by another user/clone on that network, an additional suffix '_' is added until the nick is accepted on that network. - Nick of users or clones that are longer than 16 characters are ignored as some networks only allow nicknames of length 16 or less. Limitations ----------- - This program will not work on any channel that requires any kind of registration or verification as clones cannot register. - Linking the same channel with a different name is undefined and can create an infinite loop of clones. - Linking more than one channel from a network is undefined. - No spam protection. - No support for TLS/SSL. Features -------- - Written in OpenBSD's C style(9). - One clone per user on each channel. Dependencies ------------ - C compiler (C89) - C POSIX library - libbsd (on non-BSD operating systems) - POSIX make (optional) Installation ------------- Edit config.mk for your system. Then to compile and install, run: $ make clean install To compile without POSIX make on BSD systems, run: $ cc -o ticl main.c htable.c Or on non-BSD systems, run: $ cc -o ticl main.c htable.c -lbsd Usages ------ This program uses FIFO special file (a named pipe) for configuration. To start the program: $ ticl <fifo> # Example: $ ticl in # This will create a 'in' FIFO file if it doesn't already exist. Or, to start the program with the log printing to a file: $ ticl <fifo> > <logfile> 2>&1 # Example: $ ticl in > log 2>&1 # This will create a 'log' file and print everything to the file. Or, to start and run the program in background: $ ticl <fifo> > <logfile> 2>&1 & # Example: $ ticl in > log 2>&1 & To add a channel: $ echo 'netadd <name> <symbol> <host> <ip> <channel>' > <fifo> # Example, to link #test20 from libera and #test21 from ircnow: $ echo 'netadd libera L irc.libera.chat 6667 #test20' > in $ echo 'netadd ircnow N irc.ircnow.org 6667 #test21' > in To remove a channel from the link: $ echo 'netdel <name>' > <fifo> # Example, to unlink channel ircnow: $ echo 'netdel ircnow' > in To list all the users: $ echo users > <fifo> To close the program: $ echo exit > <fifo> SSL/TLS Support --------------- On Openbsd (relayd): Edit /etc/relayd.conf: table <libera> { irc.libera.chat } table <ircnow> { irc.ircnow.org } protocol "irctls" { tcp { nodelay, sack } } relay "libera" { listen on 127.0.0.1 port 31220 protocol "irctls" forward with tls to <libera> port 6697 } relay "ircnow" { listen on 127.0.0.1 port 31221 protocol "irctls" forward with tls to <ircnow> port 6697 } To enable and start: $ doas rcctl enable relayd $ doas rcctl start relayd On other platforms (stunnel): Edit /etc/stunnel/stunnel.conf: pid = /etc/stunnel/pid [libera] client = yes accept = 127.0.0.1:31220 connect = irc.libera.chat:6697 checkHost = irc.libera.chat verifyChain = yes CApath = /etc/ssl/certs OCSPaia = yes [ircnow] client = yes accept = 127.0.0.1:31221 connect = irc.ircnow.org:6697 checkHost = irc.ircnow.org verifyChain = yes CApath = /etc/ssl/certs OCSPaia = yes Then enable and start stunnel service. Now to connect: $ echo 'netadd libera L 127.0.0.1 31220 #test20' > in $ echo 'netadd ircnow N 127.0.0.1 31221 #test21' > in Community / Bug Report ---------------------- Email: libredev@ircforever.org (expect late response) IRC: #playground on irc.ircnow.org:6697 (TLS) License ------- This work is dedicated to the public domain. See COPYING file for more information. Note ---- This work is free software but please don't call it open source as the Open Source Initiative (OSI) does not consider public domain software as open source. https://opensource.org/node/878