wm: ticl

ref: 66e66acea622b6183cdf8767c4d268bfe100bce0
dir: /README/

View raw version
====================================================================
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.


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 JOIN, QUIT, PART, or NICK, the linker attempts to emulate the
same action with the clones on the other channels.

The nick of clones has the network symbol (included in square brackets) as
a suffix.

If nick is already taken then additional suffix '_' will be added until
nick is accepted on the network.


Limitation
----------

- Networks and channels that require any type of registration or verification
  will not work because clones cannot register themselves.

- Linking any two channels that are already linked will create an infinite
  loop of clones and may get your IP banned.

- Channels on the same network will not link (can be possible in the future).

- No spam protection.


Features
--------

- written in POSIX ANSI C.
- one clone for every user on all other channels.
- no support for TLS/SSL (this is a feature).


Dependencies
------------

- C compiler (C89)
- libc (with POSIX support)
- POSIX make (optional)


Compiling
---------

	$ make
or
	$ gcc ticl.c htable.c utils.c -o ticl


Example
-------

To start the program with 'in' as the fifo file:

	$ ./ticl ./in

Or, to start the program with the log printing to a file:

	$ ./ticl ./in > ticl.log

To link channel #test20 from libera and channel #test21 from ircnow:

	$ echo 'netadd libera L irc.libera.chat 6667 #test20' > ./in
	$ echo 'netadd ircnow N irc.ircnow.org 6667 #test21' > ./in

To unlink channel ircnow:

	$ echo 'netdel ircnow' > ./in

To list all the sockets (connections):

	$ echo 'print' > ./in

	# -1 indicate original user
	# -2 indicate kicked clone

To list all the users:

	$ echo 'users' > ./in

To shutdown the program:

	$ echo exit > ./in


Community
---------

Join #playground on irc.ircnow.org:6697 (TLS)

For any help, tag or private message me (libredev).

NOTE: Anything is allowed as long as you are not violating IRCNow TOS.
      (https://wiki.ircnow.org/index.php?n=Terms.Terms)

Email: libredev@ircforever.org (expect late response)


SSL/TLS support
---------------

1. relayd (OpenBSD)
-------------------

/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
	}

2. stunnel (*BSD, GNU/Linux, GNU/Hurd, Plan9, etc)
--------------------------------------------------

On debian, /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

3. To connect:
--------------

	$ echo 'netadd libera L 127.0.0.1 31220 #test20' > ./in
	$ echo 'netadd ircnow N 127.0.0.1 31221 #test21' > ./in


License
-------

This work is dedicated to the public domain.
See COPYING file for more information.


Note
----

It is a free software and please do not call it open source as the
Open Source Initiative (OSI) does not consider public domain software
as open source. https://opensource.org/node/878