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