Prevent wrapper.c from flooding the IRC server.
[iii.git] / doc / wrapper.in.1
blob8f0a047982eb5d0548b96f5cffe3f696e45d7e15
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 WRAPPER 1
7 .Os
8 .Sh NAME
9 .Nm wrapper
10 .Nd wraps
11 .Xr ii 1
12 and allows execution on connect
13 .Sh SYNOPSIS
14 .Nm
15 .Op Fl i Ar ii arg
16 .Op Fl s Ar sh arg
17 .Fl -
18 .Ar host1 port1
19 .Op Ar host2 port2 ...
20 .Sh DESCRIPTION
21 The
22 .Nm
23 utility randomly selects one pair of
24 .Ar hosts
25 and
26 .Ar ports
27 before it passes the pair as arguments to
28 .Xr ii 1
29 using
30 .Xr system 3 .
31 Additional arguments can be given to
32 .Xr ii 1
33 by specifying them in
34 .Ar ii arg .
35 In case
36 .Xr ii 1
37 exits, this procedure is done all over again.
38 .Pp
40 .Ar sh arg
41 is given,
42 .Nm
43 forks and then initializes
44 .Xr ii 1 .
45 The child process sleeps for 300 seconds (default) before passing
46 .Ar sh arg
48 .Xr system 3 .
49 This is useful in order to, for example, authenticate with NickServ or rejoin
50 IRC channels after a disconnection.
51 .Sh SEE ALSO
52 .Xr ii 1 ,
53 .Xr sh 1 ,
54 .Xr fork 3 ,
55 .Xr sleep 3 ,
56 .Xr system 3
57 .Sh HISTORY
58 The development of
59 .Nm
60 began in the early 2011's with the first version released on January 9, 2011
61 via
62 .Lk http://repo.or.cz/w/iii.git .
63 .Sh CAVEATS
64 Notice that
65 .Xr sh 1
66 meta-characters must be escaped in both
67 .Ar ii arg
68 and
69 .Ar sh arg
70 and that the
71 .Fl s
72 and
73 .Fl p
74 flags of
75 .Xr ii 1
76 have no effect in
77 .Ar ii arg .
78 .Pp
79 To prevent
80 .Xr ii 1
81 from choosing different server directories as connections are made to various
82 .Ar hosts ,
83 pass it the
84 .Fl d
85 flag.
86 The argument of the flag will override this part of the file path.
87 .Pp
89 .Nm
90 changes the working directory to "/", all file paths must be given relative to
91 that directory.