Merges from Irssi CVS.
[crypto.git] / apps / irssi / docs / manual.txt
1
2  Irssi 0.8 documentation - http://irssi.org/
3
4  Copyright(c) 2000 Timo Sirainen <cras@irssi.org>
5
6
7  Index
8
9         0. Generic babbling
10         1. Installation
11         2. Message levels
12         3. Flood protection
13         4. Configuration
14         5. Servers
15         6. Channels
16         7. IRC commands and features
17         8. Notify list
18         9. Text highlighting
19         10. Ignoring
20         11. Logging
21
22         ( not written yet: )
23         12. Aliases
24         13. Themes
25         14. Last log (currently text version only)
26         15. Nick and word completion
27         16. Translation tables
28         17. Windowing system (text version)
29         18. Keyboard (text version)
30         19. Perl scripting
31
32
33
34  0. Generic babbling
35
36  0.1 History
37
38         Hello. I'm Timo Sirainen aka. cras, and I'm an IRC addict. :)
39
40         I'm actually quite new in IRC, I got my first internet connection
41         sometimes around fall 1997 and I started actively IRCing around
42         christmas. I used EPIC and BitchX mostly at the start, but soon
43         found some nice KDE IRC client which name I can't remember anymore.
44         It's author however stopped developing it after I had been using it
45         a few months. And since it had bugs and all, I wanted another nice
46         GUI IRC client. I didn't find any.
47
48         Since I've always been a coder and do-it-yourself guy (my own
49         offline reader and BBS software in the BBS ages), I started my own
50         IRC client at spring 1998. I called it yagIRC standing for "Yet
51         another GTK IRC client". GTK was in around version 1.0 back then,
52         and it had a lot of features/bugs which I found all the time as I
53         tried to do some "different" things than other people. These
54         sometimes prevented me of doing something some feature I wanted.
55
56         So, in summer 1998 I went to army and I passed development of yagIRC
57         to two guys, they did a few new features and released a version or
58         two, but finally (in summer 1999?) they put a message to web page
59         which told that they finally had stopped developing it entirely,
60         also saying that my code was a total mess :) (yes, it was a mess)
61
62         I got out of the army 1.1.1999. I promised to myself that I wouldn't
63         do another IRC client, but after trying to use BitchX a while, I
64         started dreaming about an IRC client which would have an excellent
65         look and feel. After trying various things, I only came up with the
66         GNOME panel applet which people still tell me that it's a great
67         feature. I was more like thinking some pretty little icons in
68         some corner telling me about new messages and other stuff..
69
70         I thought that I would keep Irssi a small project, just doing a few
71         little features that *I* wanted, nothing for others. But after few
72         versions and few interested people, I started coding it more and
73         more generic..
74
75         Finally, after releasing version 0.6.0 (february, 1999) I realized
76         that things were getting into a big mess again. I started a rewrite,
77         I organized the code into irc-base, irc-extra, user interface and
78         GUI directories, created the signalling system for letting them
79         communicate themselves easily and released 0.7.0. This was the base
80         for the rest of the 0.7.x releases, and it did work pretty well.
81         The signalling system was excellent, for example creating text mode
82         version was really easy and you didn't need tens of (empty) gui_xxx()
83         functions like in the yagIRC days. Maintaining the text and GTK
84         versions separately was really easy too.
85
86         About a year later after releasing Irssi 0.7.0, I started having
87         dreams about an IRC client that would be extremely modular, like you
88         could upgrade the client to newer version ON THE FLY without needing
89         to even disconnect from the servers. I started a project codenamed
90         i2k, I took the code from Irssi, split it into more directories and
91         changed quite a lot of the code to work a bit differently.
92
93         I developed i2k quite a long, until I finally gave up with it since
94         it could do only some basic things, and Irssi 0.7 really needed
95         maintaining. After a while I got an idea, maybe I could merge the
96         code from the i2k to Irssi more easily than rewriting the whole
97         client. This was more easier than I thought. It's now been two
98         months since I started it, and Irssi 0.8 is looking absolutely
99         excellent.
100
101  0.2 Irssi 0.8
102
103         Irssi 0.8 is my fourth try to create the perfect IRC client.
104         This time I'm concentrating to the code. I try to avoid kludges, I
105         try to make as simple code as I can, and I try to provide enough
106         easy to use functions so that extending Irssi is as simple as
107         possible. I also try to keep the "bloat" features in scripts or
108         modules instead of build-in.
109
110         I think I'm succeeded with these goals pretty well, there's some
111         small problems but everything in the big picture looks great.
112
113  0.3 Future
114
115         What about Irssi 1.0, what will it look like?
116
117         I was thinking about the Linux kernel versioning and keeping
118         Irssi 0.8 a stable version all the time while developing new
119         features only to Irssi 0.9. After 0.9 is finished, it will be
120         called 0.10 or 1.0 depending if I think it's ready to be called 1.0.
121
122         1.0's goal is that it has all the possible features anyone will
123         ever need. If not build-in, then in scripts or loadable modules.
124         Not very small goal :)
125
126  0.4 This documentation
127
128         Strange, I just created the index list and started writing this.
129         I've never been too good at documentation and I usually don't like
130         writing it, but after coding so much recently and seeing that the
131         NEWS file was getting *SO* large, I thought that I had to put all
132         these features down somewhere so people (and me!) would find them.
133
134
135  1. Installation
136
137  1.1 Configuration
138
139         configure script accepts these parameters:
140
141         --enable-ipv6      Enable IPv6 support
142         --disable-curses-windows  Don't use curses windows. Use this if
143                            screen drawing seems too slow for some reason.
144                            This option may not work properly with all
145                            curseses (solaris8).
146         --enable-memdebug  Enable memory debugging, great for finding
147                            memory leaks
148
149         --with-perl=static Build Perl support statically to irssi binary
150                            (default is to build a module)
151         --with-perl-lib=[site|vendor|DIR]  Specify installation dir for
152                            Perl libraries. Site is the default (usually
153                            /usr/local/lib/perl/...), vendor uses the path
154                            where the base of the perl is installed
155                            (/usr/lib/perl/...), or DIR specifies exactly
156                            where you want to install it.
157         --without-perl     Disable Perl support
158
159         --with-socks       Build with socks library
160         --with-bot         Build irssi-bot
161         --with-proxy       Build irssi-proxy module
162         --without-textui   Build without text frontend
163         --with-servertest  Build test irc server which you can use to try
164                            crash irc clients
165
166         In short:
167
168         ./configure
169         make
170         make install
171
172
173  1.2 Command line parameters
174
175         --connect -c <server>   Connect to server at startup
176         --port -p <port>         - specify port
177         --noconnect -!          Don't autoconnect to any servers at startup
178         --nick -n               Specify what nick to use
179         --hostname -h           Specify what host name to use
180
181
182  2. Message levels
183
184
185         Message levels (or in short, levels) are used almost everywhere.
186         They describe what kind of messages we're dealing with. Here's a
187         list of them all:
188
189         CRAP            - Can be almost anything
190         MSGS            - Private messages
191         PUBLIC          - Public messages in channel
192         NOTICES         - Notices
193         SNOTES          - Server notices
194         CTCPS           - CTCP messages
195         ACTIONS         - Actions (/me) - usually ORed with PUBLIC or MSGS
196         JOINS           - Someone joins a channel
197         PARTS           - Someone parts a channel
198         QUITS           - Someone quits IRC
199         KICKS           - Someone gets kicked from channel
200         MODES           - Channel mode is changed
201         TOPICS          - Channel topic is changed
202         WALLOPS         - Wallop is received
203         INVITES         - Invite is received
204         NICKS           - Someone changes nick
205         DCC             - DCC related messages
206         DCCMSGS         - DCC chat messages
207         CLIENTNOTICES   - Irssi's notices
208         CLIENTERRORS    - Irssi's error messages
209         CLIENTCRAP      - Some other messages from Irssi
210
211         And a few special ones that could be included with the
212         levels above:
213
214         HILIGHT         - Text is highlighted
215         NOHILIGHT       - Don't check highlighting for this message
216         NO_ACT          - Don't trigger channel activity when printing
217                           this message
218         NEVER           - Never ignore or log this message
219
220
221  3. Flood protection
222
223  3.1 Command flood protection
224
225         Most (all?) IRC servers' flood protection works like this
226         (from RFC 1459):
227
228         --------
229         * check to see if client's `message timer' is less than
230           current time (set to be equal if it is);
231
232         * read any data present from the client;
233
234         * while the timer is less than ten seconds ahead of the current
235           time, parse any present messages and penalize the client by
236           2 seconds for each message;
237
238         which in essence means that the client may send 1 message every 2
239         seconds without being adversely affected.
240         --------
241
242         Irssi's flood protection works the same way, except it penalizes
243         2.2 seconds by default for each message (helps with some servers).
244         You can change it with /SET cmd_queue_speed <milliseconds>. You can
245         also change the number of commands before flood protection activates
246         (ie. the burst count) with /SET cmd_max_at_once <count>.
247
248         IRC servers also have an input buffer where the client's commands
249         are saved before processed. It's size is server specific (can be as
250         low as 1k!) If it gets full, the server kicks you out (the
251         "Excess flood" quit message). Irssi's flood protecion protects this
252         pretty well with small commands, but if you send many big commands
253         (like >400 char long messages) fast, you could get easily kicked out.
254         Normally this isn't problem, but if you have scripts sending long
255         messages, you should remember this. I'm not sure how much you should
256         wait between the long messages, but 2 seconds isn't enough.
257
258         This protection is used with all commands sent to server, so you
259         don't need to worry about it with your scripts.
260
261  3.2 CTCP flood protection
262
263         Other people can pretty easily flood you with CTCP requests, and
264         even if you wouldn't get kicked out from the server, they could
265         easily grow your command queue. So, Irssi's CTCP flood protection
266         works like this:
267
268         First it checks how big the CTCP reply queue is, if it's longer
269         than `max_ctcp_queue', the CTCP is ignored. You can change it with
270         /SET max_ctcp_queue <count> (default is 5).
271
272         After this the CTCP reply is placed to server's "idle queue", so
273         the reply is sent "when there's extra time", this means that if
274         you are busy sending other commands, it might take a while before
275         the reply is sent.
276
277  3.3 Detecting floods
278
279         Irssi is all the time automatically checking different flooding,
280         when flood is noticed, it sends "flood" signal. This can be easily
281         used for example to create a script for kicking channel flooders.
282         Autoignore uses this also, see section 10.2.
283
284         Flood is detected when more than `flood_max_msgs' same kind of
285         messages arrives in `flood_timecheck' seconds to same target
286         (channel or private msg) so it isn't flooding if same user sends a
287         message to 10 different channels you are on, but it is flooding if
288         10 messages are sent to same channel by the same user.
289
290         Currently only messages, notices and ctcps are checked for
291         flooding.
292
293         /SET flood_max_msgs = <count>, default is 4
294         /SET flood_timecheck = <seconds>, default is 5 seconds
295         If either of these is 0, the flood checking is disabled.
296
297
298  4. Configuration
299
300  4.1 Configuration files
301
302         The configuration is saved to ~/.irssi/config file. You can edit
303         it with text editor if you want, you can also add comments to it
304         and they stay there even if /SAVE is used. Comments are the lines
305         starting with # character. Any errors in config file are displayed
306         at startup.
307
308         Irssi uses it's own config library for handling the config file.
309         The format is pretty much the same as in libPropList and should be
310         easily understandable.
311
312         You can reload the config file on the fly with /RELOAD command, you
313         can also read a different config file with /RELOAD <filename>.
314
315         If you change any settings, they aren't saved to file until you use
316         /SAVE. You can save the config file to different place with
317         /SAVE <filename>.
318
319  4.2 Settings
320
321         You can view or change the settings with /SET command.
322
323         /SET without any arguments displays all the settings.
324         /SET <key> displays settings which key (partly) matches <key>
325         /SET <key> <value> sets <key> to <value>
326
327         Boolean settings accepts only values ON, OFF and TOGGLE. You can
328         also use /TOGGLE command to change them, so /TOGGLE <key> behaves
329         like /SET <key> TOGGLE. /TOGGLE also accepts arguments ON and OFF
330         when /TOGGLE behaves exactly like /SET.
331
332         Remember that changes are not saved until you use /SAVE!
333
334
335  5. Servers
336
337  5.1 Generic
338
339         Irssi is multi-server friendly. You can be connected to multiple
340         different servers, or the same server multiple times. Most of the
341         settings that let you specify the channel, let you also specify IRC
342         network.
343
344         Servers are referenced by a "server tag". If the server is known
345         to belong to some IRC network, the tag is the IRC network's name,
346         like "ircnet". If the IRC network is unknown, the tag is created
347         from the server's name, like irc.funet.fi -> funet. If the tag
348         already exists, a number is added to the end of it and raised until
349         unused tag is found.
350
351         Quit messages have a small problem if there's already a few
352         commands in server's input command queue. If the server's socket is
353         disconnected immediately after QUIT message is sent, it is possible
354         that the server didn't yet process the quit command and your quit
355         message will be "broken pipe" or something similiar. The right thing
356         to do is to let the server disconnect you, but what if the
357         connection to server is broken and the server never disconnects you?
358         I solved the problem by waiting a few seconds to see if the server
359         disconnects us. If it didn't, force the disconnect. This explains
360         the (a bit annoying) "waiting for servers to close connections"
361         message when quiting Irssi. Most IRC clients just ignore this whole
362         problem, but I hate it if my quit message isn't displayed right.
363
364  5.2 IRC networks
365
366         Different IRC networks behave a bit differently, and to be as
367         efficient as possible, Irssi needs to know a few things about them
368         or the safe defaults will be used. The default configuration file
369         contains the settings for the biggest IRC networks.
370
371         /IRCNET ADD [-kicks <count>] [-msgs <count>] [-modes <count>]
372                     [-whois <count>] [-cmdspeed <ms>] [-cmdmax <count>]
373                     [-nick <nick>] [-user <user>] [-realname <name>]
374                     [-host <host>] [-autosendcmd <cmd>] <name>
375
376             -kicks: Maximum number of nicks in one /KICK command
377             -msgs: Maximum number of nicks in one /MSG command
378             -modes: Maximum number of mode changes in one /MODE command
379             -whois: Maximum number of nicks in one /WHOIS command
380             -cmdspeed: Same as /SET cmd_queue_speed, see section 3.1
381             -cmdmax: Same as /SET cmd_max_at_once, see section 3.1
382             -nick, -user, -realname: Specify what nick/user/name to use
383             -host: Specify what host name to use, if you have multiple
384             -autosendcmd: Command to send after connecting to a server
385
386         With -autosendcmd argument you can automatically run any commands
387         after connecting to ircnet. This is useful for automatically 
388         identifying yourself to NickServ, for example
389
390         /IRCNET ADD -autosendcmd "/msg NickServ identify secret" OPN
391
392         /IRCNET REMOVE <name>
393
394  5.3 Manually connecting and disconnecting
395
396         To connect to a new server, use:
397         /CONNECT [-ircnet <ircnet>] [-host <hostname>] <address>|<ircnet>
398                  [<port> [<password> [<nick>]]]
399
400         If there's no password, set it to -. You can directly connect to
401         IRC server in specified address, or you can connect to some IRC
402         network and Irssi will pick the server for you.
403
404         You don't need to specify the IRC network, password, nick, etc. if
405         you setup the server using /SERVER ADD (see next section). If the
406         settings can't be found there either, Irssi will use the defaults:
407
408         /SET default_nick = <nick>, defaults to user_name
409         /SET alternate_nick = <nick>, defaults to <default_nick>_
410         /SET user_name = <user>, defaults to your login name
411         /SET real_name = <name>, taken from /etc/passwd by default
412         /SET hostname = <host>, what host name to use when connecting
413         /SET skip_motd ON|OFF|TOGGLE - Don't show server's MOTD
414
415         NOTE: /CONNECT is also a command for IRC operators to connect IRC
416         servers to other IRC servers. If you want to use it, use /SCONNECT
417         instead.
418
419         You can disconnect from the server with:
420         /DISCONNECT *|<tag> [message]
421
422         If message isn't given, Irssi will use the default quit message. You
423         can set it with /SET quit_message <message>, default is "leaving".
424
425         /SERVER disconnects the server in active window and connects to new
426         one. It will take the same arguments as /CONNECT. If you prefix the
427         address with + character, Irssi won't disconnect the active server,
428         and it will create a new window where the server is connected
429         (ie. /window new hide;/connect address)
430
431         /SERVER without any arguments displays list of connected servers.
432
433  5.4 Server settings
434
435         /SERVER ADD [-auto | -noauto] [-ircnet <ircnet>] [-host <hostname>]
436                     [-cmdspeed <ms>] [-cmdmax <count>] [-port <port>]
437                     <address> [<port> [<password>]]
438
439             -auto: Automatically connect to server at startup
440             -noauto: Don't connect to server at startup (default)
441             -ircnet: Specify what IRC network this server belongs to
442             -host: Specify what host name to use, if you have multiple
443             -cmdspeed: Same as /SET cmd_queue_speed, see section 3.1
444             -cmdmax: Same as /SET cmd_max_at_once, see section 3.1
445             -port: This is pretty much like the port argument later, except
446                    this can be used to modify existing server's port.
447
448         /SERVER REMOVE <address> [<port>]
449
450         /SERVER LIST
451
452         Servers are identified by their name and port. You can have multiple
453         entries for the same server name but in different ports. This is
454         useful for IRC proxies, in one port you could have IRCNet proxy,
455         another port would have EFNet, etc.
456
457         If you wish to change existing server's port to something else, use
458         -port command. For example if you had irc.server.org in port 6667
459         and you wanted to change it to port 6668, use command:
460
461         /SERVER ADD -port 6668 irc.server.org 6667
462
463         If you want to remove some settings from existing server, for
464         example hostname, just give -host "" parameters to it.
465
466         After connected to server, Irssi can automatically change your user
467         mode. You can set it with /SET usermode <mode>, default is +i.
468
469  5.5 Automatic reconnecting
470
471         If you get disconnected from server, Irssi will try to reconnect
472         back to some of the servers in the same IRC network. To prevent
473         flooding the server that doesn't let you in (and avoiding K-lines),
474         Irssi won't try to reconnect to the same server more often than
475         once in `server_reconnect_time' seconds. You can change it with
476         /SET server_reconnect_time <seconds>, default is 5 minutes.
477
478         After reconnected to server, Irssi will re-set your user mode, away
479         message and will join you back to the same channels where you were
480         before the connection was lost.
481
482         You can see list of the reconnections with /SERVER. The servers
483         that have tag as RECON-n are the reconnections. You can remove them
484         with /DISCONNECT <tag>, and you can reconnect to them immediately
485         with /RECONNECT <n>. /RECONNECT without any arguments will
486         disconnect from the active server and reconnect back immediately.
487
488  5.6 Command redirections
489
490         FIXME
491
492  5.7 Server idle command queue
493
494         There's some situations when you want to ask something from the
495         server which isn't really important. For example when connected
496         to server and you didn't get your nick, Irssi asks with /WHOIS
497         who has your nick and displays it. But if you already have a lot of
498         commands in buffer, like you just autojoined to many channels,
499         you'd rather first let the JOIN commands to be sent to server
500
501         This is where server idle queue gets into picture. Commands in
502         idle queue are sent to server when there's nothing else in the
503         normal command queue.
504
505         Idle queue works with server redirections, so you can ask something
506         from server when it has time and your function is called when the
507         reply is received.
508
509  5.8 Net splits
510
511         Irssi keeps track of people who were lost in net splits. You can
512         get a list of them with /NETSPLIT command.
513
514         Another use for this is with bots. Channel master can op anyone in
515         the channel and the bot happily accepts it. But if the opped user
516         is lost behind a net split and in netjoin the server gives ops for
517         the user, the bot should decide if the user (who isn't in bot's user
518         database) is a malicious attacker who should be deopped, or if
519         he/she/it is just some user that already had ops before the net
520         split.
521
522         /SET hide_netsplit_quits - If ON, hide all netsplit quit messages
523              and display only "Netsplit host1 host2: nicks".
524
525         /SET netsplit_max_nicks - If non-zero, limit the number of nicks
526              printed in netsplit message and add "(+<n> more, use /NETSPLIT
527              to show all of them)" text.
528
529  5.9 Lag checking
530
531         Irssi will constantly check how big the lag to the server is. It's
532         done by sending IRSSILAG CTCP replies to ourself. Using PING command
533         for this would seem more reasonable, but there was too many problems
534         with it - some servers didn't even know the whole PING command!
535
536         If the lag is too big, Irssi will reconnect to different IRC server.
537         This is sometimes useful if the connection has been stuck for 30
538         minutes but it still hasn't been closed.
539
540         /SET lag_check_time <seconds> - Specifies how often to check the
541              lag. If it is set to 0, the lag detection is disabled. Default
542              is 30 seconds.
543         /SET lag_max_before_disconnect <seconds> - Specifies how big the lag
544              can be before reconnecting to another server. Default is 5
545              minutes.
546         /SET lag_min_show <100th seconds> - Specifies the minimum lag to
547              display in status bar. Default is 1 second.
548
549  5.10 Raw log
550
551         All data that is received or sent to server is kept in a raw log
552         buffer for a while. Also event redirections are kept there. This is
553         very useful for debugging purposes.
554
555         /RAWLOG SAVE <filename> - Save the current raw log buffer to file
556         /RAWLOG OPEN <filename> - Like /RAWLOG SAVE, but keep the log file
557                                   open and write all new log to it.
558         /RAWLOG CLOSE - Close the open raw log
559
560         /SET rawlog_lines <count> - Specify the number of raw log lines to
561                                     keep in memory.
562
563
564  6. Channels
565
566  6.1 Generic
567
568         There's several types of channels you can join, here's a list of
569         the ones that Irssi supports:
570
571         #channel - Normal channels, most commonly used
572         +channel - Modeless channels, channel has no modes, no channel
573                    operators and no topic. This way no-one is above others
574                    and there's no operator-wars etc. But on the other hand,
575                    you can't kick any troublemakers..
576         &channel - Local channels, these channels aren't distributed outside
577                    the IRC server. IRCNet has replaced server notices with
578                    several different &channels (&ERRORS, &NOTICES, etc.)
579         !channel - New channels, currently supported only by IRCNet. These
580                    channels are designed so that they can't be taken over
581                    with net splits. /JOIN !channel joins to existing
582                    !channel, /JOIN !!channel creates a new channel.
583
584         Most of the commands that take channel name as parameter, can also
585         accept * as the channel name, which means the active channel.
586
587
588  6.2 Joining, parting
589
590         Channels can be joined with /JOIN command. You can join to multiple
591         channels with one /JOIN by giving it a comma-separated list of
592         channels, like /JOIN #channel1,#channel2. If you don't give the
593         channel mode character (#+&!) before the channel name, Irssi
594         automatically uses # channels.
595
596         Channel name may contain any characters except SPACE, BELL, NUL,
597         CR, LF or comma (','). You can also restrict the channel to only
598         certain users by adding the hostmask to the end of the channel
599         name separated with a ':' character, like #channel:*!*@*.fi lets
600         only people from .fi domain join the channel. This doesn't work with
601         all IRC servers and it's pretty difficult to use, since everyone
602         will have to always join the #channel:*!*@*.fi channel, #channel or
603         #channel:*!*@*.se channels are different channels. Ban exceptions
604         (+e) and especially invite lists (+I) replace this functionality
605         pretty well, see section 6.5.
606
607         If channel has a password (aka. key), you can join it with
608         /JOIN #channel pass, or multiple channels with passwords with
609
610         /JOIN #secret1,#public,#secret2 pass1,x,pass2
611
612         #public didn't have any password, so we used "x" as it's password.
613         It doesn't really matter what password you send with channels that
614         don't have passwords.
615
616         If you want to join to channel in different server than active one
617         in window, you can do it with /JOIN -<server tag> #channel, like
618         /JOIN -efnet #irssi.
619
620         You can leave channels with /PART [<channels>] [<part message>].
621         For example "/PART byebye all" leaves the active channel with
622         "byebye all" message, or /PART #chan1,#chan2 leaves those channels.
623
624         NOTE: Sending JOIN 0 directly to server (/quote join 0) leaves all
625         the channels you are joined. There's been some jokes about joining
626         for example to #2000,0 where the server actually leaves you from all
627         channels. With Irssi this isn't really a problem, since irssi would
628         happily join to channels #2000 and #0.
629
630  6.3 Automatic joining
631
632         Irssi can automatically join to specified channels in specified
633         IRC networks. It can also automatically send the password when
634         manually joining to channel without specifying the password.
635
636         /CHANNEL ADD [-auto | -noauto] [-bots <masks>] [-botcmd <command>]
637                  <channel> <ircnet> [<password>]
638
639         With -bots and -botcmd arguments you can automatically send
640         commands to someone in channel. This is useful for automatically
641         getting ops for channels, for example
642
643         /CHANNEL ADD -auto -bots "*!bot@bothost.org bot*!*@host2.org"
644                  -botcmd "msg $0 op mypass" #channel ircnet
645
646         You can also use the -botcmd without -bots argument. The command is
647         then sent whenever you join the channel.
648
649         If you want to remove some settings from existing channel record,
650         for example bots, just give the -bots "" parameters to it. Password
651         can be removed by setting it to - (or actually, "" works too).
652
653         You can remove the channels with
654         /CHANNEL REMOVE <channel> <ircnet>
655
656         /CHANNEL LIST displays list of channels with settings.
657         /CHANNEL without any arguments displays list of channels you have
658         joined. You can also use /CHANNEL to join to channels just as with
659         /JOIN, like /CHANNEL #a.
660
661  6.4 After-join automation
662
663         When joined to channel, Irssi asks some information about it.
664         After it has got all of it, it prints the "Channel synchronized"
665         text. The following information is asked:
666
667         - Channel mode
668         - WHO list to get nicks' hosts - useful for /BAN for example
669         - Ban list - useful for allowing /UNBAN to use wildcards
670         - Exception list, Invite list - these are asked only from servers
671           that support +I and +e modes, mostly just IRCNet and some EFNet
672           servers. These aren't really needed for anything currenty, except
673           /INVITELIST and /BANS uses them to display the lists.
674
675         If you have joined many channels at once, Irssi tries to optimize
676         the commands it sends to server. Instead of sending two commands
677         to ask two channels' mode, it just sends MODE #a,#b. Same thing with
678         WHO list and ban/except/invite lists. Some servers do not support
679         this and they reply with different kinds of error messages, Irssi
680         tries to deal with them all right and resend the commands again
681         separately. However, some strange servers sometimes use some weird
682         error replies that Irssi doesn't know about, and the channel never
683         gets synchronized. If this happens with some server you know, please
684         let the Irssi's author know about it.
685
686  6.5 Channel modes
687
688         Irssi knows these channel modes:
689
690         i - Invite only - People can't join to channel without being
691             /INVITEd, or being in invite list (+I, see below).
692         m - Moderated - People who don't have voices (+v) can't send
693             messages to channel
694         p - Private - People who aren't joined to channel can't see it
695             for example with /WHOISing people who are in channel.
696         s - Secret - Like private, but the channel isn't displayed in
697             /LIST's output.
698         n - No external msgs - Without this mode, anyone can send messages
699             to channel without even being joined.
700         t - Topic can be changed only by channel operators.
701
702         k <key> - Channel password (aka. key) - The channel can't be joined
703                   without specifying the channel key (see section 6.2).
704
705         l <count> - User limit - No more than <count> people can join to
706                     channel. This can be overridden with /INVITE with some
707                     servers.
708
709                     This is usually used for protecting channel from join
710                     flooding, like some bot allows max. 5 users to join in
711                     one minute or so.
712
713         a - Anonymous - No-one's nick name, host or anything else can be
714             seen. All messages, joins, parts, modes, etc. are seen as coming
715             from nick "anonymous", this could be pretty confusing but nice
716             feature if you want total anonymity. This mode can only be set,
717             never unset. This mode isn't supported by all servers.
718
719             NOTE: there is/was one bug :) Channel operators can guess if some
720             nick might be in the channel and try to kick it. If nick was in
721             channel, everyone will see the nick that was kicked.
722
723         r - Re-op - If channel becomes opless for longer than 45 (?) minutes,
724             op everyone in the channel. This works only in !channels. This
725             mode can only be set, not unset by channel creator.
726
727         b - Set/remove ban. For example MODE #channel +b *!*@*.org bans
728             everyone from .org domain.
729
730             If someone from .org domain was already in channel before the
731             ban was set, he/she couldn't be able to write any messages to
732             channel (doesn't work with all servers).
733
734             Ban can also be overridden with /INVITE, although many stupid
735             IRC clients automatically kick the user out because they see
736             the ban and think that because of it the user shouldn't be in
737             the channel (doesn't work with all servers).
738
739         e - Ban exceptions. You could for example ban everyone from
740             *!*@*.org but set ban exception to *!*@*.host.org - works only
741             in IRCnet/EFnet servers.
742
743         I - Invite list. If channel is invite only (+i), people in this
744             list can join it without being /INVITEd - works only in
745             IRCnet/EFnet servers.
746
747             This is excellent for in-country channels that don't want
748             foreigners (spammers!) to join the channel, for example setting
749             channel's mode to +i and +I *!*@*.fi allows only finnish people
750             to join the channel. In addition to this, there's usually a bot
751             in the channels and sending /MSG bot invite command to it
752             /INVITEs you to the channel.
753
754             The ':' feature in channel modes is quite similiar, see section
755             6.2.
756
757         O - Channel owner, the nick who creates a !channel receives this
758             mode. It isn't displayed anywhere, you can't pass it to anyone
759             else and you can't regain it again. This is needed for setting
760             +r mode in channel when it's first created.
761
762         o <nick> - Grant or revoke channel operator status from nick
763         v <nick> - Grant or revoke voice status from nick, only people with
764                    +v (or +o) can talk to channel when it's moderated (+m).
765
766         You can send multiple mode changes with one mode command:
767
768         /MODE #channel +nto-o+v nick1,nick2,nick3
769
770         This would set channel's mode to +nt, give ops to nick1, take ops
771         from nick2 and give voices to nick3.
772
773         You can set only limited number of modes that requires argument in
774         one command. In IRCnet it's 3, in EFnet it's 4 and in many others
775         it's 6. If it's not known, Irssi defaults to 3. Irssi will also
776         automatically split them, so you can use /MODE +oooooo n1,n2,..
777         command to op 6 people and Irssi will split it to two commands in
778         IRCnet/EFnet.
779
780         Instead of manually setting o, v and b modes you probably want to
781         use /OP, /DEOP, /VOICE, /DEVOICE, /BAN and /UNBAN commands.
782
783         /OP, /DEOP, /VOICE and /DEVOICE commands allows wildcards as their
784         argument. So /OP ni* will op all non-opped people whose nick start
785         with "ni". /DEOP * will deop everyone else except you. /VOICE and
786         /DEVOICE work the same way.
787
788  6.6 Bans
789
790         You can give /BAN a list of nicks or whole ban masks. /UNBAN
791         accepts wildcards, so if you have ban nick!user@reallylonghost.org,
792         you can simply unban it with /UNBAN *really*
793
794         Using /BAN <nicks>, Irssi will automatically create the mask. You
795         can change the way it's created with /BANTYPE command:
796
797         /BANTYPE normal|host|domain|custom
798
799         Normal - *!user@*.domain.net
800         Host   - *!*@host.domain.net
801         Domain - *!*@*.domain.net
802         Custom [nick] [user] [host] [domain]
803                eg. /bantype custom nick domain - nick!*@*.domain.net
804                eg. /bantype custom user host - *!user@host.domain.net
805
806         Irssi has also a couple of commands to help banning people:
807
808         /KICKBAN [<channel>] <nick> <reason> - ban and kick the nick
809         /KNOCKOUT [<seconds>] <nick> <reason> - kickban the nick, unban
810                   after waiting <seconds>, default is 5 minutes.
811
812  6.7 Massjoins
813
814         Automatic opping the nick right after joined to channel is a pretty
815         commonly used. What mostly irritates me with this is that the nick
816         may be opped multiple times by different people, or after netsplits
817         when the people join back, the server will op them, but still the
818         bots op the people again, even if it was just done by the server.
819
820         Irssi has this feature that it sends a "massjoin" signal a while
821         after the real join. If someone has already opped the nick, you can
822         easily check it in the massjoin signal handler.
823
824         The default is to report maximum of 5 joins in one massjoin signal.
825         If the 5 joins don't come in 5 seconds, the signal is sent anyway.
826         You can change these with /SET massjoin_max_wait <milliseconds> and
827         /SET massjoin_max_joins <count>.
828
829
830  7. IRC commands and features (FIXME)
831
832  7.x Basic commands
833
834  7.x IRC operator commands
835
836  7.x Away features
837
838  8. Notify list
839
840         Notify list is generally used for knowing when someone you know
841         comes to IRC or leaves from IRC. Traditionally notify list can
842         handle only a list of nicks, no nick masks etc. I lost interest to
843         traditional notify lists long time ago, since the people I know
844         are in IRC all the time. So I made a bit more featureful notify
845         list:
846
847         /NOTIFY [-list] [-away] [-idle [minutes]] <mask> [ircnet [ircnet...]]
848
849             -away: Notifies about away-status changes
850             -idle: Notifies if idle time is first larger than <minutes>
851                    (default is hour) and then it drops down.
852             -list: Lists the notify list entries with all their settings
853             <mask>: Either a simple "nick" or "nick!*@*blah.org". The nick
854                     can't contain wildcards, but the user/host can.
855
856         /UNNOTIFY <mask>
857
858         /NOTIFY without any arguments displays if the people in notify
859         list are online or offline.
860
861
862  9. Text highlighting
863
864         Irssi supports highlighting lines that match the specified pattern.
865         You can also change the color of the nicks that match specified nick
866         mask, so you could for example show your friends' nicks with
867         different color.
868
869         /HILIGHT [-mask | -regexp | -word] [-nick] [-color <color>]
870                  [-level <level>] [-channels <channels>] <text>
871
872             -mask: Match only for nick, <text> is a nick mask
873             -regexp: <text> is a regular expression
874             -word: <text> must match to full words
875             -nick: Hilight only the nick, not the whole line
876             -color: Print the reply with <color> - see below
877             -level: Match only for <level> messages, default is
878                     publics,msgs,notices,actions
879             -channels: Match only in <channels>
880
881         /DEHILIGHT <ref#> | <text>
882
883         /HILIGHT without any arguments displays list of the hilights.
884
885         By default the highlighted line will be printed with white color.
886         You can change this with the -color argument. If <color> is a
887         number, Irssi will treat it as a MIRC color code. You can also use
888         bolds (^B), underlines (^_) etc. as <color> if you like.
889
890
891  10. Ignoring
892
893  10.1 Manual ignoring
894
895         Irssi's ignoring options should be enough for everyone :)
896
897         /IGNORE [-regexp | -word] [-pattern <pattern>] [-replies] [-except]
898                 [-channels <channel>] <mask> <levels> <^levels>
899
900             -regexp: <pattern> is a regular expression
901             -word: <pattern> must match to full words
902             -pattern: <pattern> must match to the message's text
903             -replies: Ignore replies to nick in channels. For example
904                       "/IGNORE -replies *!*@*.fi PUBLIC" ignores everyone
905                       from Finland, but also anyone sending message
906                       "tofinnishnick: blahblah".
907             -except: *DON'T* ignore
908             -channels: Ignore only in channels
909             <mask>: Either a nick mask or list of channels
910             <levels>: List of levels to ignore
911             <^levels>: List of levels to NOT ignore
912                        (/ignore -except nick notices = /ignore nick ^notices)
913
914         /UNIGNORE <ref#> | <mask>
915
916         /IGNORE without any arguments displays list of ignores.
917
918         The best match always wins, so you can have:
919
920             /IGNORE * CTCPS
921             /IGNORE -except *!*@host.org CTCPS
922
923  10.2 Automatic ignoring
924
925         Irssi can automatically set ignores for people who flood you.
926         Currently you can autoignore MSGS, NOTICES, CTCPS and PUBLIC.
927         Actions are placed to either MSGS or PUBLIC. See section 3.3 for
928         definition of the flood.
929
930         /SET autoignore_time <seconds> specifies how long to ignore the
931         user.
932
933         /SET autoignore_levels <levels> specifies what levels to ignore
934         automatically, default is to ignore only CTCPS.
935
936
937  11. Logging
938
939  11.1 Basic logging
940
941         /LOG OPEN [-noopen] [-autoopen] [-targets <targets>]
942                   [-window] <filename> [<levels>]
943
944             -noopen: Create the entry to log list, but don't start logging
945             -autoopen: Automatically open this log file at startup
946             -targets: Log only in specified channels/nicks
947             -window: Log the active window
948             <filename>: File name where to log, it is parsed with
949                         strftime(), so %d=day, etc. see "man strftime" for
950                         more info. Irssi will automatically check every hour
951                         if log should be rotated.
952             <levels>: Defaults to ALL
953
954         /LOG CLOSE <ref#> | <fname> - Close log and remove from log list
955         /LOG START <ref#> | <fname> - Start logging to file
956         /LOG STOP <ref#> | <fname> - Stop logging to file
957         /LOG without any arguments displays the log list
958
959         /SET log_create_mode <mode> - Specifies what file mode to use with
960              the created log files. Default is 0644.
961
962         All of these are parsed with strftime():
963         /SET log_timestamp <text> - Specifies the time stamp format.
964              Default is "%H:%M ".
965         /SET log_open_string <text> - Text written to log when it's opened
966         /SET log_close_string <text> - Text written to log when it's closed
967         /SET log_day_changed <text> - Text written to log when day changes
968
969         NOTE: Log files are locked after opened, so two Irssis can't
970         accidentally try to write to the same log file.
971
972         Examples:
973
974         /LOG OPEN -targets cras ~/irclogs/cras.log MSGS
975           - Logs all messages from/to nick `cras'
976
977         /LOG OPEN -targets #linux ~/irclogs/linux/linux-%Y-%m-%d
978           - Logs all messages in channel #linux. Log is rotated daily, so
979             logs in 1. May 2000 goes to file "linux-2000-05-01", when the
980             day is changed, Irssi closes the log and starts logging to
981             "linux-2000-05-02" etc.
982
983  11.2 Window logging
984
985         /WINDOW LOG ON|OFF|TOGGLE [<filename>]
986
987         Start/stop logging the active window. This works exactly like
988         /LOG OPEN -window.
989
990         /WINDOW LOGFILE <filename>
991
992         Sets the default log file to use in the window, it can be
993         overridden with specifying the file name in /WINDOW LOG. If no file
994         name isn't given, Irssi defaults to ~/irc.log.<windowname> or
995         ~/irc.log.Window<ref#> if window doesn't have name.
996
997         Creates the entry to log list, same as /LOG OPEN -window -noopen.
998         Also, if /WINDOW LOG ON is used it starts logging to this file.
999
1000  11.3 Automatic logging
1001
1002         This is the logging method that I had been asked to implement for
1003         ages, and it is really simple to use too. It logs only messages
1004         that have "targets", ie. private messages and channel specific
1005         messages (msgs, modes, topics, etc). WHOIS replies and such aren't
1006         logged. If you with to log them too, use the /LOG command.
1007
1008         So, when for example a private messages comes to you from "guy"
1009         nick, Irssi creates a log file ~/irclogs/guy.log for it. After few
1010         minutes of inactivity, the log file is closed.
1011
1012         /SET AUTOLOG ON|OFF|TOGGLE - Enable/disable autolog.
1013
1014         /SET AUTOLOG_LEVEL <level> - Specifies what levels to log, default
1015         is ALL.
1016
1017         /SET AUTOLOG_PATH <path> - expandos (see special_vars.txt) can be
1018         used, $0 is the target. If you are using multiple servers, it makes
1019         sense to use the server tag as part of the file name, for example
1020         ~/irclogs/$tag/$0.log (this is the default). The directories are
1021         created automatically.
1022
1023  11.4 Awaylog
1024
1025         Irssi logs specified messages when you're away. After you set
1026         yourself unaway, Irssi will display all the messages in the awaylog.
1027
1028         /SET awaylog_level <level> - Default is MSGS HILIGHT
1029         /SET awaylog_file <filename> - Default is ~/.irssi/away.log
1030
1031         You can disable this feature by setting awaylog_level to NONE.
1032
1033
1034 .. no, the docs end here, I got bored of writing these after a few days and 
1035 haven't touched these since then.