README (4900B)
1 ====================================================================== 2 WARNING: This program is still in progress, use it at your own risk. 3 ====================================================================== 4 5 ticl - tiny irc channel linker 6 ------------------------------ 7 8 ticl is a very small and simple multi-network irc channel linker. 9 10 WARNING: If you use this program on networks that you are not allowed 11 then your nick or IP may get banned. This is because this 12 program opens multiple simultaneous connections to the server 13 and most networks have some limit on each IP. 14 15 16 Working 17 ------- 18 19 - A bot named 'linker' joins each given channels and clones each user 20 of its channel on other channels and relays the user's messages 21 received from its channel to the clones on other channels. 22 23 - If a user on a channel joins(JOIN), quits(QUIT), leaves(PART), or 24 changes their nick(NICK), the linker attempts to emulate the same 25 action with the respective clones on the other channels. 26 27 - Each clone's nick is followed by the original user's channel symbol 28 (enclosed in square brackets). 29 30 - If the nick is already taken by another user/clone on that network, 31 an additional suffix '_' is added until the nick is accepted on that 32 network. 33 34 - Nick of users or clones that are longer than 16 characters are 35 ignored as some networks only allow nicknames of length 16 or less. 36 37 38 Limitations 39 ----------- 40 41 - This program will not work on any channel that requires any kind of 42 registration or verification as clones cannot register. 43 44 - Linking the same channel with a different name is undefined and can 45 create an infinite loop of clones. 46 47 - Linking more than one channel from a network is undefined. 48 49 - No spam protection. 50 51 - No support for TLS/SSL. 52 53 54 Features 55 -------- 56 57 - Written in OpenBSD's C style(9). 58 59 - One clone per user on each channel. 60 61 62 Dependencies 63 ------------ 64 65 - C compiler (C89) 66 67 - C POSIX library 68 69 - libbsd (on non-BSD operating systems) 70 71 - POSIX make (optional) 72 73 74 Installation 75 ------------- 76 77 Edit config.mk for your system. 78 79 Then to compile and install, run: 80 81 $ make clean install 82 83 To compile without POSIX make on BSD systems, run: 84 85 $ cc -o ticl main.c htable.c 86 87 Or on non-BSD systems, run: 88 89 $ cc -o ticl main.c htable.c -lbsd 90 91 92 Usages 93 ------ 94 95 This program uses FIFO special file (a named pipe) for configuration. 96 97 To start the program: 98 99 $ ticl <fifo> 100 101 # Example: 102 103 $ ticl in 104 105 # This will create a 'in' FIFO file if it doesn't already exist. 106 107 Or, to start the program with the log printing to a file: 108 109 $ ticl <fifo> > <logfile> 2>&1 110 111 # Example: 112 113 $ ticl in > log 2>&1 114 115 # This will create a 'log' file and print everything to the file. 116 117 Or, to start and run the program in background: 118 119 $ ticl <fifo> > <logfile> 2>&1 & 120 121 # Example: 122 123 $ ticl in > log 2>&1 & 124 125 To add a channel: 126 127 $ echo 'netadd <name> <symbol> <host> <ip> <channel>' > <fifo> 128 129 # Example, to link #test20 from libera and #test21 from ircnow: 130 131 $ echo 'netadd libera L irc.libera.chat 6667 #test20' > in 132 $ echo 'netadd ircnow N irc.ircnow.org 6667 #test21' > in 133 134 To remove a channel from the link: 135 136 $ echo 'netdel <name>' > <fifo> 137 138 # Example, to unlink channel ircnow: 139 140 $ echo 'netdel ircnow' > in 141 142 To list all the users: 143 144 $ echo users > <fifo> 145 146 To close the program: 147 148 $ echo exit > <fifo> 149 150 151 SSL/TLS Support 152 --------------- 153 154 On Openbsd (relayd): 155 156 Edit /etc/relayd.conf: 157 158 table <libera> { irc.libera.chat } 159 table <ircnow> { irc.ircnow.org } 160 161 protocol "irctls" { 162 tcp { nodelay, sack } 163 } 164 165 relay "libera" { 166 listen on 127.0.0.1 port 31220 167 protocol "irctls" 168 forward with tls to <libera> port 6697 169 } 170 171 relay "ircnow" { 172 listen on 127.0.0.1 port 31221 173 protocol "irctls" 174 forward with tls to <ircnow> port 6697 175 } 176 177 To enable and start: 178 179 $ doas rcctl enable relayd 180 $ doas rcctl start relayd 181 182 On other platforms (stunnel): 183 184 Edit /etc/stunnel/stunnel.conf: 185 186 pid = /etc/stunnel/pid 187 188 [libera] 189 client = yes 190 accept = 127.0.0.1:31220 191 connect = irc.libera.chat:6697 192 checkHost = irc.libera.chat 193 verifyChain = yes 194 CApath = /etc/ssl/certs 195 OCSPaia = yes 196 197 [ircnow] 198 client = yes 199 accept = 127.0.0.1:31221 200 connect = irc.ircnow.org:6697 201 checkHost = irc.ircnow.org 202 verifyChain = yes 203 CApath = /etc/ssl/certs 204 OCSPaia = yes 205 206 Then enable and start stunnel service. 207 208 Now to connect: 209 210 $ echo 'netadd libera L 127.0.0.1 31220 #test20' > in 211 $ echo 'netadd ircnow N 127.0.0.1 31221 #test21' > in 212 213 214 Community / Bug Report 215 ---------------------- 216 217 Email: libredev@ircforever.org (expect late response) 218 IRC: #playground on irc.ircnow.org:6697 (TLS) 219 220 221 License 222 ------- 223 224 This work is dedicated to the public domain. 225 See COPYING file for more information. 226 227 228 Note 229 ---- 230 231 This work is free software but please don't call it open source as the 232 Open Source Initiative (OSI) does not consider public domain software 233 as open source. https://opensource.org/node/878