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