Prevent wrapper.c from flooding the IRC server.
[iii.git] / doc / ii.in.1
blob58af17558d053f4c8a21f9b630cc41e7ed59c322
1 .\" The author of this work has dedicated it to the public by waiving all of
2 .\" his or her rights to the work under copyright law and all related or
3 .\" neighboring legal rights he or she had in the work, to the extent allowable
4 .\" by law.
5 .Dd $Mdocdate$
6 .Dt II 1
7 .Os
8 .Sh NAME
9 .Nm ii
10 .Nd IRC it or IRC improved
11 .Sh SYNOPSIS
12 .Nm
13 .Op Fl d Ar directory
14 .Op Fl e
15 .Op Fl f Ar realname
16 .Op Fl i Ar prefix
17 .Op Fl k Ar password
18 .Op Fl n Ar nickname
19 .Op Fl p Ar port
20 .Op Fl s Ar servername
21 .Sh DESCRIPTION
22 .Nm
23 is a minimalistic FIFO and file system based IRC client.
24 Upon connection, it creates an IRC directory
25 .Ar prefix
26 which contains the server directory (its name can be overridden by
27 .Ar directory
29 Beyond the path, inside the server directory, there are channel and nickname
30 directories together with a FIFO file named "ii" and a regular one called
31 "out".
32 These two latter files do also occur inside each channel and nickname
33 directory, which themselves are created upon joining a channel or opening of a
34 private conversation.
35 .Pp
36 The FIFO files "in" are used to communicate with the server, while the regular
37 "out" files carry the server messages.
38 If the data sent to an "in" file is not an IRC command, in other words not
39 starting with a slash "/", it will be interpreted as a regular message (PRIVMSG)
40 which later pops up in the "out" file in the same directory level.
41 .Pp
42 The idea of this file system structure, is to be able to communicate with an
43 IRC server using basic command line tools.
44 For example, if the desired action is to join a channel, the command
45 .Cm echo "/j #channel" > in
46 will do the trick no matter which "in" FIFO file it is addressed to, as long as
47 the file is in use by the current instance of
48 .Nm .
49 For more information about available commands, see further down in this
50 section.
51 .Pp
52 The arguments are as follows, with the default values enclosed within brackets:
53 .Bl -tag -width Ds
54 .It Fl d Ar directory
55 Overrides the
56 .Ar servername
57 part within the directory structure that
58 .Nm
59 creates.
60 .It Fl e
61 Connect to the
62 .Ar servername
63 using SSLv2/SSLv3/TLSv1 encryption.
64 The default
65 .Ar port
66 in this mode is 6697.
67 .Pp
68 Support for encryption can be disabled at compile time, check config.mk for
69 further information on disabling it. To see whether the
70 .Nm
71 binary supports encryption, give it the
72 .Fl h
73 option and, in case support is enabled, the
74 .Fl e
75 flag should show up in the list of available arguments.
76 .It Fl f Ar realname
77 The real name that is to be associated with the
78 .Ar nickname .
79 .It Fl i Ar prefix
80 The directory in which
81 .Nm
82 will create its server directory.
83 (irc)
84 .It Fl k Ar password
85 A password used to authenticate the
86 .Ar nickname
87 with the server. Be aware of the problem that it will be visible in the process
88 list.
89 If this is not a desired side-effect, then simply use a query to submit the
90 password.
91 .It Fl n Ar nickname
92 The used nickname during the IRC session.
93 This is of course also possible to change later on by querying the
94 server using the
95 .Cm /n
96 command.
97 (anonymous)
98 .It Fl p Ar port
99 The port that
101 will connect to on the specific
102 .Ar servername .
103 (6667)
104 .It Fl s Ar servername
105 The server to which
107 will connect.
108 (irc.freenode.net)
111 The commands that
113 understands are as follows:
114 .Bl -tag -width Ds
115 .It Cm /a [message]
116 Used in order to mark oneself as away.
117 The server will send the
118 .Ar message
119 automatically in reply to a PRIVMSG directed at the user (you).
121 .Ar message
122 is omitted, the away status is removed.
123 .It Cm /j #channel/nickname [message]/message
124 Join a channel or open a private conversation with another user having the nick
125 .Ar nickname .
126 If the purpose is to join a channel, then the
127 .Ar message
128 is meaning the key that is needed in order to join the password protected
129 channel.
130 When opening a private conversation, then the
131 .Ar message
132 (compulsory) is sent to the
133 .Ar nickname
134 as a PRIVMSG.
135 .It Cm /l [comment]
136 Causes the user to leave the current channel with an optional
137 .Ar comment .
138 This must be sent to the "in" FIFO file located within the channel directory.
139 .It Cm /n nickname
140 Change the nick to
141 .Ar nickname .
142 .It Cm /t [#channel] [topic]
143 Change the topic of the specified channel, or the current one if omitted (must
144 then be sent to an "in" file inside a channel directory), to
145 .Ar topic .
147 .Ar topic
148 is skipped, the server will report what the topic is to the "out" file that is
149 located in the server directory.
151 .Sh FILES
152 .Bl -tag -width Ds
153 .It Cm in
154 The FIFO files "in" are used to communicate with the server.
155 .It Cm irc
156 Inside this directory is the server directory and within the last mentioned
157 one, there are channel and nickname directories together with a FIFO file named
158 "ii" and a regular one called "out".
159 These two latter files do also occur inside each channel and nickname
160 directory, which themselves are created upon joining a channel or opening of a
161 private conversation.
163 It is possible to override
164 .Cm irc
165 by specifying the
166 .Ar prefix
167 argument.
168 .It Cm out
169 These files carry the server messages.
171 .Sh SEE ALSO
172 .Xr echo 1 ,
173 .Xr tail 1 ,
174 .Xr SSL_get_peer_certificate 3
175 .Sh AUTHORS
176 .An Copyright \(co 2005-2006 by Anselm R. Garbe <garbeam (at) gmail (dot) com>
177 .An Copyright \(co 2005-2008 by Nico Golde <nico (at) ngolde (dot) de>
178 .Sh CAVEATS
180 cannot tell whether a specific user exists when the
181 .Cm /j
182 command is used to open a private conversation.
183 This means that it always succeeds if the syntax is correct, even if nobody
184 will receive the
185 .Ar message .
186 However, the server will, in these cases, report when a specific user is not
187 available, so a check in the "out" file, in the server directory, works as a
188 solution to this problem.
190 No verification of the X509 certificate is made when encryption (
191 .Fl e
192 flag is passed to
194 ) is used.
195 However, the MD5 fingerprint is printed to the "out" file that is located
196 inside the server directory.
197 In other words, it is possible to compare the fingerprint of the used
198 certificate with the fingerprint of the known and correct one.