Added SILC Thread Queue API
[crypto.git] / apps / irssi / docs / startup-HOWTO.html
1  <h2>Startup HOWTO</h2>
2
3  <h3>To new Irssi users (not to new IRC users ..)</h3>
4
5  <p>Copyright (c) 2000-2002 by Timo Sirainen, release under
6     <a href="http://www.gnu.org/licenses/fdl.html">GNU FDL</a> 1.1 license.</p>
7
8
9 <p>Index with some FAQ questions that are answered in the chapter:</p>
10
11 <ol>
12 <li><a href="#c1">For all the lazy people</a>
13     <ul>
14     <li>This window management is just weird, I want it exactly like ircII</li>
15     </ul></li>
16 <li><a href="#c2">Basic user interface usage</a>
17     <ul>
18     <li>Split windows work in weird way</li>
19     <li>How can I easily switch between windows?</li>
20     <li>But alt-1 etc. don't work!</li>
21     </ul></li>
22 <li><a href="#c3">Server and channel automation</a>
23     <ul>
24     <li>How do I automatically connect to servers at startup?</li>
25     <li>How do I automatically join to channels at startup?</li>
26     <li>How do I automatically send commands to server at connect?</li>
27     </ul></li>
28 <li><a href="#c4">Setting up windows and automatically restoring them
29     at startup</a></li>
30 <li><a href="#c5">Status and msgs windows &amp; message levels</a>
31     <ul>
32     <li>I want /WHOIS to print reply to current window</li>
33     <li>I want all messages to go to one window, not create new windows</li>
34     </ul></li>
35 <li><a href="#c6">How support for multiple servers works in irssi</a>
36     <ul>
37     <li>I connected to some server that doesn't respond and now irssi
38         keeps trying to reconnect to it again and again, how can I stop
39         it??</li>
40     <li>I want to have own status and/or msgs window for each servers</li>
41     </ul></li>
42 <li><a href="#c7">/LASTLOG and jumping around in scrollback</a>
43     <ul>
44     <li>How can I save all texts in a window to file?</li>
45     </ul></li>
46 <li><a href="#c8">Logging</a></li>
47 <li><a href="#c9">Changing keyboard bindings</a>
48     <ul>
49     <li>How do I make F1 key do something?</li>
50     </ul></li>
51 <li><a href="#c10">Proxies and IRC bouncers</a>
52     <ul>
53     <li>What's this irssi-proxy?</li>
54     </ul></li>
55 <li><a href="#c11">Irssi's settings</a></li>
56 <li><a href="#c12">Statusbar</a>
57     <ul>
58     <li>I loaded a statusbar script but it's not visible anywhere!</li>
59     </ul></li>
60 </ol>
61
62 <h3><a id="c1">1. For all the lazy people</a></h3>
63
64 <p>These settings should give you pretty good defaults (the ones I use):</p>
65
66 <p>If colors don't work, and you know you're not going to use some
67 weird non-VT compatible terminal (you most probably aren't), just
68 say:</p>
69
70 <pre>
71 /SET term_force_colors ON
72 </pre>
73
74 <p>I don't like automatic query windows, I don't like status window, I do
75 like msgs window where all messages go:</p>
76
77 <pre>
78 /SET autocreate_own_query OFF
79 /SET autocreate_query_level DCCMSGS
80 /SET use_status_window OFF
81 /SET use_msgs_window ON
82 </pre>
83
84 <p>Disable automatic window closing when <code>/PART</code>ing channel or
85 <code>/UNQUERY</code>ing query:</p>
86
87 <pre>
88 /SET autoclose_windows OFF
89 /SET reuse_unused_windows ON
90 </pre>
91
92 <p>Here's the settings that make irssi work exactly like ircII in window
93 management (send me a note if you can think of more):</p>
94
95 <pre>
96 /SET autocreate_own_query OFF
97 /SET autocreate_query_level NONE
98 /SET use_status_window OFF
99 /SET use_msgs_window OFF
100 /SET reuse_unused_windows ON
101 /SET windows_auto_renumber OFF
102
103 /SET autostick_split_windows OFF
104 /SET autoclose_windows OFF
105 /SET print_active_channel ON
106 </pre>
107
108 <p>And example how to add servers:</p>
109
110 <p>(OFTC network, identify with nickserv and wait for 2 seconds before
111 joining channels)</p>
112
113 <pre>
114 /NETWORK ADD -autosendcmd "/^msg nickserv ident pass;wait 2000" OFTC
115 </pre>
116
117 <p>(NOTE: use /IRCNET with 0.8.9 and older)</p>
118
119 <p>Then add some servers to different networks (network is already set up 
120 for them), irc.kpnqwest.fi is used by default for IRCNet but if it fails,
121 irc.funet.fi is tried next:</p>
122
123 <pre>
124 /SERVER ADD -auto -network IRCnet irc.kpnqwest.fi 6667
125 /SERVER ADD -network IRCnet irc.funet.fi 6667
126 /SERVER ADD -auto -network efnet efnet.cs.hut.fi 6667
127 </pre>
128
129 <p>Automatically join to channels after connected to server, send op request
130 to bot after joined to efnet/#irssi:</p>
131
132 <pre>
133 /CHANNEL ADD -auto #irssi IRCnet
134 /CHANNEL ADD -auto -bots *!*bot@host.org -botcmd "/^msg $0 op pass" #irssi efnet
135 </pre>
136
137 If you want lines containing your nick to hilight:
138
139 <pre>
140 /HILIGHT nick
141 </pre>
142
143 <h3><a id="c2">2. Basic user interface usage</a></h3>
144
145 <p>Windows can be scrolled up/down with PgUp and PgDown keys. If they don't
146 work for you, use Meta-p and Meta-n keys. For jumping to beginning or end of
147 the buffer, use <code>/SB HOME</code> and <code>/SB END</code> commands.</p>
148
149 <p>By default, irssi uses "hidden windows" for everything. Hidden window is
150 created every time you <code>/JOIN</code> a channel or <code>/QUERY</code>
151 someone. There's several ways you can change between these windows:</p>
152
153 <pre>
154 Meta-1, Meta-2, .. Meta-0 - Jump directly between windows 1-10
155 Meta-q .. Meta-o          - Jump directly between windows 11-19
156 /WINDOW &lt;number&gt;          - Jump to any window with specified number
157 Ctrl-P, Ctrl-N            - Jump to previous / next window
158 </pre>
159
160 <p>Clearly the easiest way is to use Meta-number keys. And what is the Meta
161 key? ESC key always works as Meta, but there's also easier ways. ALT could
162 work as Meta, or if you have Windows keyboard, left Windows key might work
163 as Meta. If they don't work directly, you'll need to set a few X resources
164 (NOTE: these work with both xterm and rxvt):</p>   
165
166 <pre>
167 XTerm*eightBitInput:   false
168 XTerm*metaSendsEscape: true
169 </pre>
170
171 <p>With rxvt, you can also specify which key acts as Meta key. So if you
172 want to use ALT instead of Windows key for it, use:</p>
173
174 <pre>
175 rxvt*modifier: alt
176 </pre>
177
178 <p>You could do this by changing the X key mappings:</p>
179
180 <pre>
181 xmodmap -e "keysym Alt_L = Meta_L Alt_L"
182 </pre>
183
184 <p>And how exactly do you set these X resources? For Debian, there's
185 <code>/etc/X11/Xresources/xterm</code> file where you can put them and it's
186 read automatically when X starts. <code>~/.Xresources</code> and 
187 <code>~/.Xdefaults</code> files might also work. If you can't get anything
188 else to work, just copy and paste those lines to <code>~/.Xresources</code>
189 and directly call <code>xrdb -merge ~/.Xresources</code> in some xterm. 
190 The resources affect only the new xterms you start, not existing ones.</p> 
191
192 <p>Many windows SSH clients also don't allow usage of ALT. One excellent
193 client that does allow is putty, you can download it from
194 <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">
195 http://www.chiark.greenend.org.uk/~sgtatham/putty/</a>.</p>
196
197 <p>Irssi also supports split windows, they've had some problems in past
198 but I think they should work pretty well now :) Here's some commands
199 related to them:</p>
200
201 <pre>
202 /WINDOW NEW                    - Create new split window
203 /WINDOW NEW HIDE               - Create new hidden window
204 /WINDOW CLOSE                  - Close split or hidden window
205
206 /WINDOW HIDE [&lt;number&gt;|&lt;name&gt;] - Make the split window hidden window
207 /WINDOW SHOW &lt;number&gt;|&lt;name&gt;   - Make the hidden window a split window
208
209 /WINDOW SHRINK [&lt;lines&gt;]       - Shrink the split window
210 /WINDOW GROW [&lt;lines&gt;]         - Grow the split window
211 /WINDOW BALANCE                - Balance the sizes of all split windows
212 </pre>
213
214 <p>By default, irssi uses "sticky windowing" for split windows. This means
215 that windows created inside one split window cannot be moved to another
216 split window without some effort. For example you could have following
217 window layout:</p>
218
219 <pre>
220 Split window 1: win#1 - Status window, win#2 - Messages window
221 Split window 2: win#3 - IRCnet/#channel1, win#4 - IRCnet/#channel2
222 Split window 3: win#5 - efnet/#channel1, win#6 - efnet/#channel2
223 </pre>
224
225 <p>When you are in win#1 and press ALT-6, irssi jumps to split window
226 #3 and moves the efnet/#channel2 the active window.</p>
227
228 <p>With non-sticky windowing the windows don't have any relationship with
229 split windows, pressing ALT-6 in win#1 moves win#6 to split window 1
230 and sets it active, except if win#6 was already visible in some other
231 split window irssi just changes to that split window. This it the way
232 windows work with ircii, if you prefer it you can set it with</p>
233
234 <pre>
235 /SET autostick_split_windows OFF
236 </pre>
237
238 <p>Each window can have multiple channels, queries and other "window
239 items" inside them. If you don't like windows at all, you disable
240 automatic creating of them with</p>
241
242 <pre>
243 /SET autocreate_windows OFF
244 </pre>
245
246 <p>And if you keep all channels in one window, you most probably want
247 the channel name printed in each line:</p>
248
249 <pre>
250 /SET print_active_channel ON
251 </pre>
252
253 <p>If you want to group only some channels or queries in one window,
254 use</p>
255
256 <pre>
257 /JOIN -window #channel
258 /QUERY -window nick
259 </pre>
260
261 <h3><a id="c3">3. Server and channel automation</a></h3>
262
263 <p>Irssi's multiple IRC network support is IMHO very good - at least
264 compared to other clients :) Even if you're only in one IRC network you
265 should group all your servers to be in the same IRC network as this
266 helps with reconnecting if your primary server breaks and is probably
267 useful in some other ways too :) For information how to actually use
268 irssi correctly with multiple servers see the chapter 6.</p>
269
270 <p>First you need to have your IRC network set, use <code>/NETWORK</code>
271 command to see if it's already there. If it isn't, use <code>/NETWORK ADD
272 yournetwork</code>. If you want to execute some commands automatically when
273 you're connected to some network, use <code>-autosendcmd</code> option.
274 (NOTE: use /IRCNET with 0.8.9 and older.) Here's some examples:</p>
275
276 <pre>
277 /NETWORK ADD -autosendcmd '^msg bot invite' IRCnet
278 /NETWORK ADD -autosendcmd "/^msg nickserv ident pass;wait 2000" OFTC
279 </pre>
280
281 <p>After that you need to add your servers. For example:</p>
282
283 <pre>
284 /SERVER ADD -auto -network IRCnet irc.kpnqwest.fi 6667
285 /SERVER ADD -auto -network worknet irc.mycompany.com 6667 password
286 </pre>
287
288 <p>The <code>-auto</code> option specifies that this server is
289 automatically connected at startup. You don't need to make more than one
290 server with <code>-auto</code> option to one IRC network, other servers are
291 automatically connected in same network if the <code>-auto</code> server
292 fails.</p>
293
294 <p>And finally channels:</p>
295
296 <pre>
297 /CHANNEL ADD -auto -bots *!*bot@host.org -botcmd "/^msg $0 op pass" #irssi efnet
298 /CHANNEL ADD -auto #secret IRCnet password
299 </pre>
300
301 <p><code>-bots</code> and <code>-botcmd</code> should be the only ones
302 needing a bit of explaining. They're used to send commands automatically to
303 bot when channel is joined, usually to get ops automatically. You can
304 specify multiple bot masks with <code>-bots</code> option separated with
305 spaces (and remember to quote the string then). The $0 in
306 <code>-botcmd</code> specifies the first found bot in the list. If you
307 don't need the bot masks (ie. the bot is always with the same nick, like
308 chanserv) you can give only the <code>-botcmd</code> option and the command
309 is always sent.</p>
310
311 <h3><a id="c4">4. Setting up windows and automatically restoring them at startup</a></h3>
312
313 <p>First connect to all the servers, join the channels and create the
314 queries you want. If you want to move the windows or channels around
315 use commands:</p>
316
317 <pre>
318 /WINDOW MOVE LEFT/RIGHT/number    - move window elsewhere
319 /WINDOW ITEM MOVE &lt;number&gt;|&lt;name&gt; - move channel/query to another window
320 </pre>
321
322 <p>When everything looks the way you like, use <code>/LAYOUT SAVE</code>
323 command (and <code>/SAVE</code>, if you don't have autosaving enabled) and
324 when you start irssi next time, irssi remembers the positions of the
325 channels, queries and everything. This "remembering" doesn't mean that
326 simply using <code>/LAYOUT SAVE</code> would automatically make irssi
327 reconnect to all servers and join all channels, you'll need the
328 <code>/SERVER ADD -auto</code> and <code>/CHANNEL ADD -auto</code> commands
329 to do that.</p>
330
331 <p>If you want to change the layout, you just rearrange the layout like
332 you want it and use <code>/LAYOUT SAVE</code> again. If you want to remove
333 the layout for some reason, use <code>/LAYOUT RESET.</code></p>
334
335
336 <h3><a id="c5">5. Status and msgs windows &amp; message levels</a></h3>
337
338 <p>By default, all the "extra messages" go to status window. This means
339 pretty much all messages that don't clearly belong to some channel or
340 query. Some people like it, some don't. If you want to remove it, use</p>
341
342 <pre>
343 /SET use_status_window OFF
344 </pre>
345
346 <p>This doesn't have any effect until you restart irssi. If you want to
347 remove it immediately, just <code>/WINDOW CLOSE</code> it.</p>
348
349 <p>Another common window is "messages window", where all private
350 messages go. By default it's disabled and query windows are created
351 instead. To make all private messages go to msgs window, say:</p>
352
353 <pre>
354 /SET use_msgs_window ON
355 /SET autocreate_query_level DCCMSGS  (or if you don't want queries to
356                                       dcc chats either, say NONE)
357 </pre>
358
359 <p>use_msgs_window either doesn't have any effect until restarting
360 irssi. To create it immediately say:</p>
361
362 <pre>
363 /WINDOW NEW HIDE     - create the window
364 /WINDOW NAME (msgs)  - name it to "(msgs)"
365 /WINDOW LEVEL MSGS   - make all private messages go to this window
366 /WINDOW MOVE 1       - move it to first window
367 </pre>
368
369 <p>Note that neither use_msgs_window nor use_status_window have any
370 effect at all if <code>/LAYOUT SAVE</code> has been used.</p>
371
372 <p>This brings us to message levels.. What are they? All messages that
373 irssi prints have one or more "message levels". Most common are PUBLIC
374 for public messages in channels, MSGS for private messages and CRAP for
375 all sorts of messages with no real classification. You can get a whole
376 list of levels with</p>
377
378 <pre>
379 /HELP levels
380 </pre>
381
382 <p>Status window has message level <code>ALL -MSGS</code>, meaning that all
383 messages, except private messages, without more specific place go to status
384 window. The <code>-MSGS</code> is there so it doesn't conflict with
385 messages window.</p>
386
387
388 <h3><a id="c6">6. How support for multiple servers works in irssi</a></h3>
389
390 <p>ircii and several other clients support multiple servers by placing
391 the connection into some window. IRSSI DOES NOT. There is no required
392 relationship between window and server. You can connect to 10 servers
393 and manage them all in just one window, or join channel in each one of
394 them to one sigle window if you really want to. That being said, here's
395 how you do connect to new server without closing the old connection:</p>
396
397 <pre>
398 /CONNECT irc.server.org
399 </pre>
400
401 <p>Instead of the <code>/SERVER</code> which disconnects the existing
402 connection. To see list of all active connections, use <code>/SERVER</code>
403 without any parameters. You should see a list of something like:</p>
404
405 <pre>
406 -!- IRCNet: irc.song.fi:6667 (IRCNet)
407 -!- OFTC: irc.oftc.net:6667 (OFTC)
408 -!- RECON-1: 192.168.0.1:6667 () (02:59 left before reconnecting)
409 </pre>
410
411 <p>Here you see that we're connected to IRCNet and OFTC networks.
412 The IRCNet at the beginning is called the "server tag" while the
413 (IRCnet) at the end shows the IRC network. Server tag specifies unique
414 tag to refer to the server, usually it's the same as the IRC network.
415 When the IRC network isn't known it's some part of the server name.
416 When there's multiple connections to same IRC network or server, irssi
417 adds a number after the tag so there could be network, network2, network3
418 etc.</p>
419
420 <p>Server tags beginning with <code>RECON-</code> mean server
421 reconnections. Above we see that connection to server at 192.168.0.1 wasn't
422 successful and irssi will try to connect it again in 3 minutes.</p>
423
424 <p>To disconnect one of the servers, or to stop irssi from
425 reconnecting, use</p>
426
427 <pre>
428 /DISCONNECT network   - disconnect server with tag "network"
429 /DISCONNECT recon-1  - stop trying to reconnect to RECON-1 server
430 /RMRECONNS           - stop all server reconnections
431
432 /RECONNECT recon-1   - immediately try reconnecting back to RECON-1
433 /RECONNECT ALL       - immediately try reconnecting back to all
434                        servers in reconnection queue
435 </pre>
436
437 <p>Now that you're connected to all your servers, you'll have to know how
438 to specify which one of them you want to use. One way is to have an
439 empty window, like status or msgs window. In it, you can specify which
440 server to set active with</p>
441
442 <pre>
443 /WINDOW SERVER tag    - set server "tag" active
444 Ctrl-X                - set the next server in list active
445 </pre>
446
447 <p>When the server is active, you can use it normally. When there's
448 multiple connected servers, irssi adds [servertag] prefix to all
449 messages in non-channel/query messages so you'll know where it came
450 from.</p>
451
452 <p>Several commands also accept <code>-servertag</code> option to specify
453 which server it should use:</p>
454
455 <pre>
456 /MSG -tag nick message
457 /JOIN -tag #channel
458 /QUERY -tag nick
459 </pre>
460
461 <p><code>/MSG</code> tab completion also automatically adds the
462 <code>-tag</code> option when nick isn't in active server.</p>
463
464 <p>Window's server can be made sticky. When sticky, it will never
465 automatically change to anything else, and if server gets disconnected, the
466 window won't have any active server. When the server gets connected again,
467 it is automatically set active in the window. To set the window's server
468 sticky use</p>
469
470 <pre>
471 /WINDOW SERVER -sticky tag
472 </pre>
473
474 <p>This is useful if you wish to have multiple status or msgs windows, one
475 for each server. Here's how to do them (repeat for each server)</p>
476
477 <pre>
478 /WINDOW NEW HIDE
479 /WINDOW NAME (status)
480 /WINDOW LEVEL ALL -MSGS
481 /WINDOW SERVER -sticky network
482
483 /WINDOW NEW HIDE
484 /WINDOW NAME (msgs)
485 /WINDOW LEVEL MSGS
486 /WINDOW SERVER -sticky network
487 </pre>
488
489 <h3><a id="c7">7. /LASTLOG and jumping around in scrollback</a></h3>
490
491 <p><code>/LASTLOG</code> command can be used for searching texts in
492 scrollback buffer. Simplest usages are</p>
493
494 <pre>
495 /LASTLOG word     - print all lines with "word" in them
496 /LASTLOG word 10  - print last 10 occurances of "word"
497 /LASTLOG -topics  - print all topic changes
498 </pre>
499
500 <p>If there's more than 1000 lines to be printed, irssi thinks that you
501 probably made some mistake and won't print them without <code>-force</code>
502 option. If you want to save the full lastlog to file, use</p>
503
504 <pre>
505 /LASTLOG -file ~/irc.log
506 </pre>
507
508 <p>With <code>-file</code> option you don't need <code>-force</code> even
509 if there's more than 1000 lines. <code>/LASTLOG</code> has a lot of other
510 options too, see <code>/HELP lastlog</code> for details.</p>
511
512 <p>Once you've found the lines you were interested in, you might want
513 to check the discussion around them. Irssi has <code>/SCROLLBACK</code> (or
514 alias <code>/SB</code>) command for jumping around in scrollback buffer.
515 Since <code>/LASTLOG</code> prints the timestamp when the message was
516 originally printed, you can use <code>/SB GOTO hh:mm</code> to jump
517 directly there. To get back to the bottom of scrollback, use <code>/SB
518 END</code> command.</p>
519
520
521 <h3><a id="c8">8. Logging</a></h3>
522
523 <p>Irssi can automatically log important messages when you're set away
524 (<code>/AWAY reason</code>). When you set yourself unaway
525 (<code>/AWAY</code>), the new messages in away log are printed to screen.
526 You can configure it with:</p>
527
528 <pre>
529 /SET awaylog_level MSGS HILIGHT     - Specifies what messages to log
530 /SET awaylog_file ~/.irssi/away.log - Specifies the file to use
531 </pre>
532
533 <p>Easiest way to start logging with Irssi is to use autologging. With it
534 Irssi logs all channels and private messages to specified directory.
535 You can turn it on with</p>
536
537 <pre>
538 /SET autolog ON
539 </pre>
540
541 <p>By default it logs pretty much everything execept CTCPS or CRAP
542 (<code>/WHOIS</code> requests, etc). You can specify the logging level
543 yourself with</p>
544
545 <pre>
546 /SET autolog_level ALL -CRAP -CLIENTCRAP -CTCPS (this is the default)
547 </pre>
548
549 <p>By default irssi logs to ~/irclogs/&lt;servertag&gt;/&lt;target&gt;.log.
550 You can change this with</p>
551
552 <pre>
553 /SET autolog_path ~/irclogs/$tag/$0.log (this is the default)
554 </pre>
555
556 <p>The path is automatically created if it doesn't exist. $0 specifies
557 the target (channel/nick). You can make irssi automatically rotate the
558 logs by adding date/time formats to the file name. The formats are in
559 "man strftime" format. For example</p>
560
561 <pre>
562 /SET autolog_path ~/irclogs/%Y/$tag/$0.%m-%d.log
563 </pre>
564
565 <p>For logging only some specific channels or nicks, see <code>/HELP
566 log</code></p>
567
568
569 <h3><a id="c9">9. Changing keyboard bindings</a></h3>
570
571 <p>You can change any keyboard binding that terminal lets irssi know
572 about. It doesn't let irssi know everything, so for example
573 shift-backspace can't be bound unless you modify xterm resources
574 somehow.</p>
575
576 <p><code>/HELP bind</code> tells pretty much everything there is to know
577 about keyboard bindings. However, there's the problem of how to bind some
578 non-standard keys. They might differ a bit with each terminal, so you'll
579 need to find out what exactly the keypress produces. Easiest way to check
580 that would be to see what it prints in <code>cat</code>. Here's an example
581 for pressing F1 key:</p>
582
583 <pre>
584 [cras@hurina] ~% cat
585 ^[OP
586 </pre>
587
588 <p>So in irssi you would use <code>/BIND ^[OP /ECHO F1 pressed</code>. If
589 you use multiple terminals which have different bindings for the key, it
590 would be better to use eg.:</p>
591
592 <pre>
593 /BIND ^[OP key F1
594 /BIND ^[11~ key F1
595 /BIND F1 /ECHO F1 pressed.
596 </pre>
597
598 <h3><a id="c10">10. Proxies and IRC bouncers</a></h3>
599
600 <p>Irssi supports connecting to IRC servers via a proxy. All server
601 connections are then made through it, and if you've set up everything
602 properly, you don't need to do any <code>/QUOTE SERVER</code> commands
603 manually.</p>
604
605 <p>Here's an example: You have your bouncer (lets say, BNC or BNC-like)
606 listening in irc.bouncer.org port 5000. You want to use it to connect
607 to servers irc.dalnet and irc.efnet.org. First you'd need to setup the
608 bouncer:</p>
609
610 <pre>
611 /SET use_proxy ON
612 /SET proxy_address irc.bouncer.org
613 /SET proxy_port 5000
614
615 /SET proxy_password YOUR_BNC_PASSWORD_HERE
616 /SET -clear proxy_string
617 /SET proxy_string_after conn %s %d
618 </pre>
619
620 <p>Then you'll need to add the server connections. These are done
621 exactly as if you'd want to connect directly to them. Nothing special
622 about them:</p>
623
624 <pre>
625 /SERVER ADD -auto -network dalnet irc.dal.net
626 /SERVER ADD -auto -network efnet irc.efnet.org
627 </pre>
628
629 <p>With the proxy <code>/SET</code>s however, irssi now connects to those
630 servers through your BNC. All server connections are made through them so
631 you can just forget that your bouncer even exists.</p>
632
633 <p>If you don't want to use the proxy for some reason, there's
634 <code>-noproxy</code> option which you can give to <code>/SERVER</code> and
635 <code>/SERVER ADD</code> commands.</p>
636
637 <p><strong>Proxy specific settings:</strong></p>
638
639 <p>All proxies have these settings in common:</p>
640
641 <pre>
642 /SET use_proxy ON
643 /SET proxy_address &lt;Proxy host address&gt;
644 /SET proxy_port &lt;Proxy port&gt;
645 </pre>
646
647 <p><strong>HTTP proxy</strong></p>
648
649 <p>Use these settings with HTTP proxies:</p>
650
651 <pre>
652 /SET -clear proxy_password
653 /EVAL SET proxy_string CONNECT %s:%d HTTP/1.0\n\n
654 </pre>
655
656 <p><strong>BNC</strong></p>
657
658 <pre>
659 /SET proxy_password your_pass
660 /SET -clear proxy_string
661 /SET proxy_string_after conn %s %d
662 </pre>
663
664 <p><strong>dircproxy</strong></p>
665
666 <p>dircproxy separates the server connections by passwords. So, if you
667 for example have network connection with password ircpass and
668 OFTC connection with oftcpass, you would do something like
669 this:</p>
670
671 <pre>
672 /SET -clear proxy_password
673 /SET -clear proxy_string
674
675 /SERVER ADD -auto -network IRCnet fake.network 6667 ircpass
676 /SERVER ADD -auto -network OFTC fake.oftc 6667 oftcpass
677 </pre>
678
679 <p>The server name and port you give isn't used anywhere, so you can
680 put anything you want in there.</p>
681
682 <p><strong>psyBNC</strong></p>
683
684 <p>psyBNC has internal support for multiple servers. However, it could
685 be a bit annoying to use, and some people just use different users for
686 connecting to different servers. You can manage this in a bit same way
687 as with dircproxy, by creating fake connections:</p>
688
689 <pre>
690 /SET -clear proxy_password
691 /SET -clear proxy_string
692
693 /NETWORK ADD -user networkuser IRCnet
694 /SERVER ADD -auto -network IRCnet fake.network 6667 ircpass
695 /NETWORK ADD -user oftcuser OFTC
696 /SERVER ADD -auto -network OFTC fake.oftc 6667 oftcpass
697 </pre>
698
699 <p>So, you'll specify the usernames with <code>/NETWORK ADD</code> command,
700 and the user's password with <code>/SERVER ADD</code>.</p>
701
702 <p>(NOTE: use /IRCNET with 0.8.9 and older.)</p>
703
704 <p><strong>Irssi proxy</strong></p>
705
706 <p>Irssi contains it's own proxy which you can build giving
707 <code>--with-proxy</code> option to configure. You'll still need to run
708 irssi in a screen to use it though.</p>
709
710 <p>Irssi proxy is a bit different than most proxies, normally proxies
711 create a new connection to IRC server when you connect to it, but
712 <strong>irssi proxy shares your existing IRC connection(s) to multiple
713 clients</strong>. And even more clearly: <strong>You can use only one IRC
714 server connection to IRC with as many clients as you want</strong>. Can
715 anyone figure out even more easier ways to say this, so I wouldn't need to
716 try to explain this thing for minutes every time? :)</p>
717
718 <p>Irssi proxy supports sharing multiple server connections in different
719 ports, like you can share network in port 2777 and efnet in port 2778.</p>
720
721 <p>Usage in proxy side:</p>
722
723 <pre>
724 /LOAD proxy
725 /SET irssiproxy_password &lt;password&gt;
726 /SET irssiproxy_ports &lt;network&gt;=&lt;port&gt; ... (eg. IRCnet=2777 efnet=2778)
727 </pre>
728
729 <p><strong>NOTE</strong>: you <strong>MUST</strong> add all the servers you
730 are using to server and network lists with <code>/SERVER ADD</code> and 
731 <code>/NETWORK ADD</code>. ..Except if you really don't want to for some
732 reason, and you only use one server connection, you may simply set:</p>
733
734 <pre>
735 /SET irssiproxy_ports *=2777
736 </pre>
737
738 <p>Usage in client side:</p>
739
740 <p>Just connect to the irssi proxy like it is a normal server with password
741 specified in <code>/SET irssiproxy_password</code>. For example:</p>
742
743 <pre>
744 /SERVER ADD -network IRCnet my.irssi-proxy.org 2777 secret
745 /SERVER ADD -network efnet my.irssi-proxy.org 2778 secret
746 </pre>
747
748 <p>Irssi proxy works fine with other IRC clients as well.</p>
749
750 <p><strong>SOCKS</strong></p>
751
752 Irssi can be compiled with socks support (<code>--with-socks</code> option
753 to configure), but I don't really know how it works, if at all. <code>/SET
754 proxy</code> settings don't have anything to do with socks however.
755
756 <p><strong>Others</strong></p>
757
758 <p>IRC bouncers usually work like IRC servers, and want a password. You can
759 give it with:</p>
760
761 <pre>
762 /SET proxy_password &lt;password&gt;
763 </pre>
764
765 <p>Irssi's defaults for connect strings are</p>
766
767 <pre>
768 /SET proxy_string CONNECT %s %d
769 /SET proxy_string_after
770 </pre>
771
772 <p>The proxy_string is sent before NICK/USER commands, the
773 proxy_string_after is sent after them. %s and %d can be used with both
774 of them.</p>
775
776 <h3><a id="c11">11. Irssi's settings</a></h3>
777
778 <p>You probably don't like Irssi's default settings. I don't like them.
779 But I'm still convinced that they're pretty good defaults. Here's some
780 of them you might want to change (the default value is shown):</p>
781
782 <p><strong>Queries</strong></p>
783
784 <dl>
785 <dt>/SET autocreate_own_query ON</dt>
786   <dd>Should new query window be created when you send message to someone
787   (with <code>/MSG</code>).</dd>
788
789 <dt>/SET autocreate_query_level MSGS</dt>
790   <dd>New query window should be created when receiving messages with
791   this level. MSGS, DCCMSGS and NOTICES levels work currently. You can
792   disable this with <code>/SET -clear autocreate_query_level</code>.</dd>
793
794 <dt>/SET autoclose_query 0</dt>
795   <dd>Query windows can be automatically closed after certain time of
796   inactivity. Queries with unread messages aren't closed and active
797   window is neither never closed. The value is given in seconds.</dd>
798 </dl>
799
800 <p><strong>Windows</strong></p>
801
802 <dl>
803 <dt>/SET use_msgs_window OFF</dt>
804   <dd>Create messages window at startup. All private messages go to this
805   window. This only makes sense if you've disabled automatic query
806   windows. Message window can also be created manually with /WINDOW LEVEL
807   MSGS, /WINDOW NAME (msgs).</dd>
808
809 <dt>/SET use_status_window ON</dt>
810   <dd>Create status window at startup. All messages that don't really
811   have better place go here, like all /WHOIS replies etc. Status window
812   can also be created manually with <code>/WINDOW LEVEL ALL -MSGS</code>,
813   <code>/WINDOW NAME (status)</code>.</dd>
814
815 <dt>/SET autocreate_windows ON</dt>
816   <dd>Should we create new windows for new window items or just place
817   everything in one window</dd>
818
819 <dt>/SET autoclose_windows ON</dt>
820   <dd>Should window be automatically closed when the last item in them is
821   removed (ie. <code>/PART</code>, <code>/UNQUERY</code>).</dd>
822
823 <dt>/SET reuse_unused_windows OFF</dt>
824   <dd>When finding where to place new window item (channel, query) Irssi
825   first tries to use already existing empty windows. If this is set ON,
826   new window will always be created for all window items. This setting is
827   ignored if autoclose_windows is set ON.</dd>
828
829 <dt>/SET window_auto_change OFF</dt>
830   <dd>Should Irssi automatically change to automatically created windows -
831   usually queries when someone sends you a message. To prevent
832   accidentally sending text meant to some other channel/nick, Irssi
833   clears the input buffer when changing the window. The text is still in
834   scrollback buffer, you can get it back with pressing arrow up key.</dd>
835
836 <dt>/SET print_active_channel OFF</dt>
837   <dd>When you keep more than one channel in same window, Irssi prints
838   the messages coming to active channel as <code>&lt;nick&gt; text</code>
839   and other channels as <code>&lt;nick:channel&gt; text</code>. If this
840   setting is set ON, the messages to active channels are also printed in
841   the latter way.</dd>
842
843 <dt>/SET window_history OFF</dt>
844   <dd>Should command history be kept separate for each window.</dd>
845 </dl>
846
847
848 <p><strong>User information</strong></p>
849
850 <dl>
851 <dt>/SET nick</dt>
852   <dd>Your nick name</dd>
853
854 <dt>/SET alternate_nick</dt>
855   <dd>Your alternate nick.</dd>
856
857 <dt>/SET user_name</dt>
858   <dd>Your username, if you have ident enabled this doesn't affect 
859   anything</dd>
860
861 <dt>/SET real_name</dt>
862   <dd>Your real name.</dd>
863 </dl>
864
865
866 <p><strong>Server information</strong></p>
867
868 <dl>
869 <dt>/SET skip_motd OFF</dt>
870   <dd>Should we hide server's MOTD (Message Of The Day).</dd>
871
872 <dt>/SET server_reconnect_time 300</dt>
873   <dd>Seconds to wait before connecting to same server again. Don't set
874   this too low since it usually doesn't help at all - if the host is
875   down, the few extra minutes of waiting won't hurt much.</dd>
876
877 <dt>/SET lag_max_before_disconnect 300</dt>
878   <dd>Maximum server lag in seconds before disconnecting and trying to
879   reconnect. This happens mostly only when network breaks between you and
880   IRC server.</dd>
881 </dl>
882
883
884 <p><strong>Appearance</strong></p>
885
886 <dl>
887 <dt>/SET timestamps ON</dt>
888   <dd>Show timestamps before each message.</dd>
889
890 <dt>/SET hide_text_style OFF</dt>
891   <dd>Hide all bolds, underlines, MIRC colors, etc.</dd>
892
893 <dt>/SET show_nickmode ON</dt>
894   <dd>Show the nick's mode before nick in channels, ie. ops have
895   <code>&lt;@nick&gt;</code>, voices <code>&lt;+nick&gt;</code> and others
896   <code>&lt;&nbsp;nick&gt;</code></dd>
897
898 <dt>/SET show_nickmode_empty ON</dt>
899   <dd>If the nick doesn't have a mode, use one space. ie. ON:
900   <code>&lt;&nbsp;nick&gt;</code>, OFF: <code>&lt;nick&gt;</code></dd>
901
902 <dt>/SET show_quit_once OFF</dt>
903   <dd>Show quit message only once in some of the channel windows the
904   nick was in instead of in all windows.</dd>
905
906 <dt>/SET lag_min_show 100</dt>
907   <dd>Show the server lag in status bar if it's bigger than this, the
908   unit is 1/100 of seconds (ie. the default value of 100 = 1 second).</dd>
909
910 <dt>/SET indent 10</dt>
911   <dd>When lines are longer than screen width they have to be split to
912   multiple lines. This specifies how much space to put at the beginning
913   of the line before the text begins. This can be overridden in text
914   formats with <code>%|</code> format.</dd>
915
916 <dt>/SET activity_hide_targets</dt>
917   <dd>If you don't want to see window activity in some certain channels
918   or queries, list them here. For example <code>#boringchannel =bot1
919   =bot2</code>. If any highlighted text or message for you appears in that
920   window, this setting is ignored and the activity is shown.</dd>
921 </dl>
922
923 <p><strong>Nick completion</strong></p>
924
925 <dl>
926 <dt>/SET completion_auto OFF</dt>
927   <dd>Automatically complete the nick if line begins with start of nick
928   and the completion character. Learn to use the tab-completion instead,
929   it's a lot better ;)</dd>
930
931 <dt>/SET completion_char :</dt>
932   <dd>Completion character to use.</dd>
933 </dl>
934
935 <h3><a id="c12">12. Statusbar</a></h3>
936
937 <p><code>/STATUSBAR</code> displays a list of statusbars:</p>
938
939 <pre>
940 Name                           Type   Placement Position Visible
941 window                         window bottom    0        always
942 window_inact                   window bottom    1        inactive
943 prompt                         root   bottom    100      always
944 topic                          root   top       1        always
945 </pre>
946
947 <p><code>/STATUSBAR &lt;name&gt;</code> prints the statusbar settings and
948 it's items. <code>/STATUSBAR &lt;name&gt; ENABLE|DISABLE</code>
949 enables/disables the statusbar. <code>/STATUSBAR &lt;name&gt; RESET</code>
950 resets the statusbar to it's default settings, or if the statusbar was
951 created by you, it will be removed.</p>
952
953 <p>Type can be window or root, meaning if the statusbar should be
954 created for each split window, or just once. Placement can be top or
955 bottom. Position is a number, the higher the value the lower in screen
956 it is. Visible can be always, active or inactive. Active/inactive is
957 useful only with split windows, one split window is active and the rest
958 are inactive. These settings can be changed with:</p>
959
960 <pre>
961 /STATUSBAR &lt;name&gt; TYPE window|root
962 /STATUSBAR &lt;name&gt; PLACEMENT top|bottom
963 /STATUSBAR &lt;name&gt; POSITION &lt;num&gt;
964 /STATUSBAR &lt;name&gt; VISIBLE always|active|inactive
965 </pre>
966
967 <p>When loading a new statusbar scripts, you'll need to also specify
968 where you want to show it. Statusbar items can be modified with:</p>
969
970 <pre>
971 /STATUSBAR &lt;name&gt; ADD [-before | -after &lt;item&gt;] [-priority #] [-alignment left|right] &lt;item&gt;
972 /STATUSBAR &lt;name&gt; REMOVE &lt;item&gt;
973 </pre>
974
975 <p>The item name with statusbar scripts is usually same as the script's
976 name. Script's documentation should tell if this isn't the case. So, to
977 add mail.pl before the window activity item (see the list with
978 <code>/STATUSBAR</code> window), use: <code>/STATUSBAR window ADD -before
979 act mail</code>.</p>