Blob


1 .\" Copyright (c) 2023-2004 Omar Polo <op@openbsd.org>
2 .\" Copyright (c) 2003-2004 Daniel Hartmeier. All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 .\"
24 .Dd August 20, 2023
25 .Dt ICBIRC 8
26 .Os
27 .Sh NAME
28 .Nm icbirc
29 .Nd proxy IRC client and ICB server
30 .Sh SYNOPSIS
31 .Nm icbirc
32 .Ar host Ns Oo : Ns Ar port Oc Ns Oo / Ns Ar room Oc
33 .Sh DESCRIPTION
34 .Nm
35 is a proxy that allows to connect an IRC client to an ICB server.
36 The proxy talks IRC via standard input and standard output,
37 so it's suitable to be run with
38 .Xr inetd 8 ,
39 and connects to the ICB server specified in the command line, optionally
40 joining automatically a room.
41 .Pp
42 Commands from the IRC client are translated to ICB commands and forwarded
43 to the ICB server.
44 Messages from the ICB server are translated to IRC messages and forwarded
45 to the IRC client.
46 .Pp
47 IRC (Internet Relay Chat) and ICB (Internet Citizen's Band) are two separate
48 chat protocols.
49 ICB is an older and simpler protocol, basically a subset of IRC.
50 The two most significant differences (from the client's perspective) are:
51 .Bl -bullet
52 .It
53 an ICB client can only join a single channel (called group).
54 Joining a second channel automatically parts the first channel.
55 .It
56 an ICB channel can only have a single operator (called moderator).
57 Giving operator status to a second client automatically removes
58 operator status from the first client.
59 .El
60 .Sh SUPPORTED COMMANDS
61 .Nm
62 supports the following IRC commands:
63 .Bl -tag -width MODExoxnickx
64 .It CAP LS, CAP REQ, CAP END
65 Basic IRCv3 capability handling is present for compliance with a wider
66 range of IRC clients.
67 .It PASS
68 Set the default group, used during login.
69 .It NICK
70 Set or change nickname.
71 .It USER
72 Supply additional user information (like ident), used during login.
73 .It LIST
74 List all groups.
75 .It WHOIS
76 Shows information about a user.
77 .It WHO
78 Lists matching users.
79 Arguments starting with '#' are interpreted as channel names
80 (listing all users in the specified channel), anything else
81 is used for a simple string search within users' 'nick!ident@host'.
82 .It JOIN
83 Join a group.
84 .It PRIVMSG
85 Send an open or personal message.
86 .It NOTICE
87 Same as PRIVMSG.
88 .It TOPIC
89 Set group topic.
90 .It KICK nick
91 Boot nick from group.
92 .It MODE +o nick
93 Pass moderation to nick.
94 .It QUIT
95 Close client and server connection, wait for next client connection.
96 .El
97 .Pp
98 Additionally, the command RAWICB can be used to send custom ICB
99 commands.
100 The proxy automatically prefixes the correct command length and
101 replaces commas with ICB argument separators.
102 For example:
103 .Bl -tag -width RAWICBxhmxnickxmsg
104 .It RAWICB hm,nick,msg
105 Send msg to nick.
106 .El
107 .Sh EXAMPLES
108 Connect to the ICB server
109 .Sq default.icb.net
110 on the default port 7326, accepting IRC commands on standard input and
111 faking IRC server messages on standard output:
112 .Pp
113 .Dl $ icbirc default.icb.net
114 .Pp
115 Like the previous, but join automatically the group (channel)
116 .Sq slackers :
117 .Pp
118 .Dl $ icbirc default.icb.net/slackers
119 .Pp
120 Run
121 .Nm
122 with
123 .Xr inetd 8 ,
124 suitable for connecting with IRC clients that don't support talking
125 IRC on a pipe:
126 .Pp
127 .Dl 6667 stream tcp nowait user /usr/local/bin/icbirc icbirc example.com
128 .Pp
129 .Sq user
130 needs to be changed with a valid, local user name.
131 .Sh SEE ALSO
132 .Rs
133 .%T Internet Relay Chat Protocol
134 .%O RFC 1459
135 .Re
136 .Rs
137 .%T Internet Relay Chat: Client Protocol
138 .%O RFC 2812
139 .Re
140 .Rs
141 .%T Internet Relay Chat: Channel Management
142 .%O RFC 2811
143 .Re
144 .Rs
145 .%T ICB Protocol
146 .%O ftp://ftp.icb.net/pub/icb/src/icbd/Protocol.html
147 .Re
148 .Rs
149 .%T The History of ICB
150 .%O http://www.icb.net/history.html
151 .Re
152 .Rs
153 .%T General guide to Netiquette on ICB
154 .%O http://www.icb.net/_jrudd/icb/netiquette.html
155 .Re
156 .Sh HISTORY
157 The first version of
158 .Nm
159 was written in 2003.
160 .Sh AUTHORS
161 .An -nosplit
162 .Nm
163 was written by
164 .An Daniel Hartmeier Aq daniel@benzedrine.cx
165 and is maintained by
166 .An Omar Polo Aq op@openbsd.org .
167 .Sh CAVEATS
168 ICB is not IRC.
169 Depending on the ICB community on a particular server, netiquette rules
170 vary greatly from common IRC rules (or lack thereof).
171 .Pp
172 Client scripts or other forms of automated client actions might generate
173 noise or violate ICB community policies, and lacking support for some
174 commands might confuse the script.
175 Clients should be properly configured and tested on a dedicated server
176 before connecting to a public server.
177 .Pp
178 In particular, WHOIS and WHO filtering is done on the proxy.
179 Each such request causes the proxy to fetch the entire user list from the
180 ICB server (there are no ICB commands that take filters), hence
181 automatic WHOIS requests from the IRC client can cause unwanted load on
182 the ICB server
183 .Pq turn off 'WHOIS on JOIN' in the IRC client, if enabled .
184 .Sh BUGS
185 On ICB, a moderator (channel operator) can leave the group (channel) and
186 rejoin later, preserving his status, as compared to IRC, where the channel
187 would be left operator-less in this case.
188 The proxy does not currently detect the operator status on rejoin in this
189 case, and the IRC client will (temporarily) show the channel op-less.