Added SILC Thread Queue API
[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         /NETWORK 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 the network. This is useful for automatically 
388         identifying yourself to NickServ, for example
389
390         /NETWORK ADD -autosendcmd "/msg NickServ identify secret" freenode
391
392         /NETWORK REMOVE <name>
393
394  5.3 Manually connecting and disconnecting
395
396         To connect to a new server, use:
397         /CONNECT [-network <network>] [-host <hostname>] <address>|<network>
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] [-network <network>] [-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             -network: Specify what IRC network this server belongs to
442             -ircnet: Same as -network. Deprecated. Do not use.
443             -host: Specify what host name to use, if you have multiple
444             -cmdspeed: Same as /SET cmd_queue_speed, see section 3.1
445             -cmdmax: Same as /SET cmd_max_at_once, see section 3.1
446             -port: This is pretty much like the port argument later, except
447                    this can be used to modify existing server's port.
448
449         /SERVER REMOVE <address> [<port>]
450
451         /SERVER LIST
452
453         Servers are identified by their name and port. You can have multiple
454         entries for the same server name but in different ports. This is
455         useful for IRC proxies, in one port you could have IRCNet proxy,
456         another port would have EFNet, etc.
457
458         If you wish to change existing server's port to something else, use
459         -port command. For example if you had irc.server.org in port 6667
460         and you wanted to change it to port 6668, use command:
461
462         /SERVER ADD -port 6668 irc.server.org 6667
463
464         If you want to remove some settings from existing server, for
465         example hostname, just give -host "" parameters to it.
466
467         After connected to server, Irssi can automatically change your user
468         mode. You can set it with /SET usermode <mode>, default is +i.
469
470  5.5 Automatic reconnecting
471
472         If you get disconnected from server, Irssi will try to reconnect
473         back to some of the servers in the same IRC network. To prevent
474         flooding the server that doesn't let you in (and avoiding K-lines),
475         Irssi won't try to reconnect to the same server more often than
476         once in `server_reconnect_time' seconds. You can change it with
477         /SET server_reconnect_time <seconds>, default is 5 minutes.
478
479         After reconnected to server, Irssi will re-set your user mode, away
480         message and will join you back to the same channels where you were
481         before the connection was lost.
482
483         You can see list of the reconnections with /SERVER. The servers
484         that have tag as RECON-n are the reconnections. You can remove them
485         with /DISCONNECT <tag>, and you can reconnect to them immediately
486         with /RECONNECT <n>. /RECONNECT without any arguments will
487         disconnect from the active server and reconnect back immediately.
488
489  5.6 Command redirections
490
491         FIXME
492
493  5.7 Server idle command queue
494
495         There's some situations when you want to ask something from the
496         server which isn't really important. For example when connected
497         to server and you didn't get your nick, Irssi asks with /WHOIS
498         who has your nick and displays it. But if you already have a lot of
499         commands in buffer, like you just autojoined to many channels,
500         you'd rather first let the JOIN commands to be sent to server
501
502         This is where server idle queue gets into picture. Commands in
503         idle queue are sent to server when there's nothing else in the
504         normal command queue.
505
506         Idle queue works with server redirections, so you can ask something
507         from server when it has time and your function is called when the
508         reply is received.
509
510  5.8 Net splits
511
512         Irssi keeps track of people who were lost in net splits. You can
513         get a list of them with /NETSPLIT command.
514
515         Another use for this is with bots. Channel master can op anyone in
516         the channel and the bot happily accepts it. But if the opped user
517         is lost behind a net split and in netjoin the server gives ops for
518         the user, the bot should decide if the user (who isn't in bot's user
519         database) is a malicious attacker who should be deopped, or if
520         he/she/it is just some user that already had ops before the net
521         split.
522
523         /SET hide_netsplit_quits - If ON, hide all netsplit quit messages
524              and display only "Netsplit host1 host2: nicks".
525
526         /SET netsplit_max_nicks - If non-zero, limit the number of nicks
527              printed in netsplit message and add "(+<n> more, use /NETSPLIT
528              to show all of them)" text.
529
530  5.9 Lag checking
531
532         Irssi will constantly check how big the lag to the server is. It's
533         done by sending IRSSILAG CTCP replies to ourself. Using PING command
534         for this would seem more reasonable, but there was too many problems
535         with it - some servers didn't even know the whole PING command!
536
537         If the lag is too big, Irssi will reconnect to different IRC server.
538         This is sometimes useful if the connection has been stuck for 30
539         minutes but it still hasn't been closed.
540
541         /SET lag_check_time <seconds> - Specifies how often to check the
542              lag. If it is set to 0, the lag detection is disabled. Default
543              is 30 seconds.
544         /SET lag_max_before_disconnect <seconds> - Specifies how big the lag
545              can be before reconnecting to another server. Default is 5
546              minutes.
547         /SET lag_min_show <100th seconds> - Specifies the minimum lag to
548              display in status bar. Default is 1 second.
549
550  5.10 Raw log
551
552         All data that is received or sent to server is kept in a raw log
553         buffer for a while. Also event redirections are kept there. This is
554         very useful for debugging purposes.
555
556         /RAWLOG SAVE <filename> - Save the current raw log buffer to file
557         /RAWLOG OPEN <filename> - Like /RAWLOG SAVE, but keep the log file
558                                   open and write all new log to it.
559         /RAWLOG CLOSE - Close the open raw log
560
561         /SET rawlog_lines <count> - Specify the number of raw log lines to
562                                     keep in memory.
563
564
565  6. Channels
566
567  6.1 Generic
568
569         There's several types of channels you can join, here's a list of
570         the ones that Irssi supports:
571
572         #channel - Normal channels, most commonly used
573         +channel - Modeless channels, channel has no modes, no channel
574                    operators and no topic. This way no-one is above others
575                    and there's no operator-wars etc. But on the other hand,
576                    you can't kick any troublemakers..
577         &channel - Local channels, these channels aren't distributed outside
578                    the IRC server. IRCNet has replaced server notices with
579                    several different &channels (&ERRORS, &NOTICES, etc.)
580         !channel - New channels, currently supported only by IRCNet. These
581                    channels are designed so that they can't be taken over
582                    with net splits. /JOIN !channel joins to existing
583                    !channel, /JOIN !!channel creates a new channel.
584
585         Most of the commands that take channel name as parameter, can also
586         accept * as the channel name, which means the active channel.
587
588
589  6.2 Joining, parting
590
591         Channels can be joined with /JOIN command. You can join to multiple
592         channels with one /JOIN by giving it a comma-separated list of
593         channels, like /JOIN #channel1,#channel2. If you don't give the
594         channel mode character (#+&!) before the channel name, Irssi
595         automatically uses # channels.
596
597         Channel name may contain any characters except SPACE, BELL, NUL,
598         CR, LF or comma (','). You can also restrict the channel to only
599         certain users by adding the hostmask to the end of the channel
600         name separated with a ':' character, like #channel:*!*@*.fi lets
601         only people from .fi domain join the channel. This doesn't work with
602         all IRC servers and it's pretty difficult to use, since everyone
603         will have to always join the #channel:*!*@*.fi channel, #channel or
604         #channel:*!*@*.se channels are different channels. Ban exceptions
605         (+e) and especially invite lists (+I) replace this functionality
606         pretty well, see section 6.5.
607
608         If channel has a password (aka. key), you can join it with
609         /JOIN #channel pass, or multiple channels with passwords with
610
611         /JOIN #secret1,#public,#secret2 pass1,x,pass2
612
613         #public didn't have any password, so we used "x" as it's password.
614         It doesn't really matter what password you send with channels that
615         don't have passwords.
616
617         If you want to join to channel in different server than active one
618         in window, you can do it with /JOIN -<server tag> #channel, like
619         /JOIN -efnet #irssi.
620
621         You can leave channels with /PART [<channels>] [<part message>].
622         For example "/PART byebye all" leaves the active channel with
623         "byebye all" message, or /PART #chan1,#chan2 leaves those channels.
624
625         NOTE: Sending JOIN 0 directly to server (/quote join 0) leaves all
626         the channels you are joined. There's been some jokes about joining
627         for example to #2000,0 where the server actually leaves you from all
628         channels. With Irssi this isn't really a problem, since irssi would
629         happily join to channels #2000 and #0.
630
631  6.3 Automatic joining
632
633         Irssi can automatically join to specified channels in specified
634         IRC networks. It can also automatically send the password when
635         manually joining to channel without specifying the password.
636
637         /CHANNEL ADD [-auto | -noauto] [-bots <masks>] [-botcmd <command>]
638                  <channel> <network> [<password>]
639
640         With -bots and -botcmd arguments you can automatically send
641         commands to someone in channel. This is useful for automatically
642         getting ops for channels, for example
643
644         /CHANNEL ADD -auto -bots "*!bot@bothost.org bot*!*@host2.org"
645                  -botcmd "msg $0 op mypass" #channel ircnet
646
647         You can also use the -botcmd without -bots argument. The command is
648         then sent whenever you join the channel.
649
650         If you want to remove some settings from existing channel record,
651         for example bots, just give the -bots "" parameters to it. Password
652         can be removed by setting it to - (or actually, "" works too).
653
654         You can remove the channels with
655         /CHANNEL REMOVE <channel> <network>
656
657         /CHANNEL LIST displays list of channels with settings.
658         /CHANNEL without any arguments displays list of channels you have
659         joined. You can also use /CHANNEL to join to channels just as with
660         /JOIN, like /CHANNEL #a.
661
662  6.4 After-join automation
663
664         When joined to channel, Irssi asks some information about it.
665         After it has got all of it, it prints the "Channel synchronized"
666         text. The following information is asked:
667
668         - Channel mode
669         - WHO list to get nicks' hosts - useful for /BAN for example
670         - Ban list - useful for allowing /UNBAN to use wildcards
671         - Exception list, Invite list - these are asked only from servers
672           that support +I and +e modes, mostly just IRCNet and some EFNet
673           servers. These aren't really needed for anything currenty, except
674           /INVITELIST and /BANS uses them to display the lists.
675
676         If you have joined many channels at once, Irssi tries to optimize
677         the commands it sends to server. Instead of sending two commands
678         to ask two channels' mode, it just sends MODE #a,#b. Same thing with
679         WHO list and ban/except/invite lists. Some servers do not support
680         this and they reply with different kinds of error messages, Irssi
681         tries to deal with them all right and resend the commands again
682         separately. However, some strange servers sometimes use some weird
683         error replies that Irssi doesn't know about, and the channel never
684         gets synchronized. If this happens with some server you know, please
685         let the Irssi's author know about it.
686
687  6.5 Channel modes
688
689         Irssi knows these channel modes:
690
691         i - Invite only - People can't join to channel without being
692             /INVITEd, or being in invite list (+I, see below).
693         m - Moderated - People who don't have voices (+v) can't send
694             messages to channel
695         p - Private - People who aren't joined to channel can't see it
696             for example with /WHOISing people who are in channel.
697         s - Secret - Like private, but the channel isn't displayed in
698             /LIST's output.
699         n - No external msgs - Without this mode, anyone can send messages
700             to channel without even being joined.
701         t - Topic can be changed only by channel operators.
702
703         k <key> - Channel password (aka. key) - The channel can't be joined
704                   without specifying the channel key (see section 6.2).
705
706         l <count> - User limit - No more than <count> people can join to
707                     channel. This can be overridden with /INVITE with some
708                     servers.
709
710                     This is usually used for protecting channel from join
711                     flooding, like some bot allows max. 5 users to join in
712                     one minute or so.
713
714         a - Anonymous - No-one's nick name, host or anything else can be
715             seen. All messages, joins, parts, modes, etc. are seen as coming
716             from nick "anonymous", this could be pretty confusing but nice
717             feature if you want total anonymity. This mode can only be set,
718             never unset. This mode isn't supported by all servers.
719
720             NOTE: there is/was one bug :) Channel operators can guess if some
721             nick might be in the channel and try to kick it. If nick was in
722             channel, everyone will see the nick that was kicked.
723
724         r - Re-op - If channel becomes opless for longer than 45 (?) minutes,
725             op everyone in the channel. This works only in !channels. This
726             mode can only be set, not unset by channel creator.
727
728         b - Set/remove ban. For example MODE #channel +b *!*@*.org bans
729             everyone from .org domain.
730
731             If someone from .org domain was already in channel before the
732             ban was set, he/she couldn't be able to write any messages to
733             channel (doesn't work with all servers).
734
735             Ban can also be overridden with /INVITE, although many stupid
736             IRC clients automatically kick the user out because they see
737             the ban and think that because of it the user shouldn't be in
738             the channel (doesn't work with all servers).
739
740         e - Ban exceptions. You could for example ban everyone from
741             *!*@*.org but set ban exception to *!*@*.host.org - works only
742             in IRCnet/EFnet servers.
743
744         I - Invite list. If channel is invite only (+i), people in this
745             list can join it without being /INVITEd - works only in
746             IRCnet/EFnet servers.
747
748             This is excellent for in-country channels that don't want
749             foreigners (spammers!) to join the channel, for example setting
750             channel's mode to +i and +I *!*@*.fi allows only finnish people
751             to join the channel. In addition to this, there's usually a bot
752             in the channels and sending /MSG bot invite command to it
753             /INVITEs you to the channel.
754
755             The ':' feature in channel modes is quite similiar, see section
756             6.2.
757
758         O - Channel owner, the nick who creates a !channel receives this
759             mode. It isn't displayed anywhere, you can't pass it to anyone
760             else and you can't regain it again. This is needed for setting
761             +r mode in channel when it's first created.
762
763         o <nick> - Grant or revoke channel operator status from nick
764         v <nick> - Grant or revoke voice status from nick, only people with
765                    +v (or +o) can talk to channel when it's moderated (+m).
766
767         You can send multiple mode changes with one mode command:
768
769         /MODE #channel +nto-o+v nick1,nick2,nick3
770
771         This would set channel's mode to +nt, give ops to nick1, take ops
772         from nick2 and give voices to nick3.
773
774         You can set only limited number of modes that requires argument in
775         one command. In IRCnet it's 3, in EFnet it's 4 and in many others
776         it's 6. If it's not known, Irssi defaults to 3. Irssi will also
777         automatically split them, so you can use /MODE +oooooo n1,n2,..
778         command to op 6 people and Irssi will split it to two commands in
779         IRCnet/EFnet.
780
781         Instead of manually setting o, v and b modes you probably want to
782         use /OP, /DEOP, /VOICE, /DEVOICE, /BAN and /UNBAN commands.
783
784         /OP, /DEOP, /VOICE and /DEVOICE commands allows wildcards as their
785         argument. So /OP ni* will op all non-opped people whose nick start
786         with "ni". /DEOP * will deop everyone else except you. /VOICE and
787         /DEVOICE work the same way.
788
789  6.6 Bans
790
791         You can give /BAN a list of nicks or whole ban masks. /UNBAN
792         accepts wildcards, so if you have ban nick!user@reallylonghost.org,
793         you can simply unban it with /UNBAN *really*
794
795         Using /BAN <nicks>, Irssi will automatically create the mask. You
796         can change the way it's created with /BANTYPE command:
797
798         /BANTYPE normal|host|domain|custom
799
800         Normal - *!user@*.domain.net
801         Host   - *!*@host.domain.net
802         Domain - *!*@*.domain.net
803         Custom [nick] [user] [host] [domain]
804                eg. /bantype custom nick domain - nick!*@*.domain.net
805                eg. /bantype custom user host - *!user@host.domain.net
806
807         Irssi has also a couple of commands to help banning people:
808
809         /KICKBAN [<channel>] <nick> <reason> - ban and kick the nick
810         /KNOCKOUT [<seconds>] <nick> <reason> - kickban the nick, unban
811                   after waiting <seconds>, default is 5 minutes.
812
813  6.7 Massjoins
814
815         Automatic opping the nick right after joined to channel is a pretty
816         commonly used. What mostly irritates me with this is that the nick
817         may be opped multiple times by different people, or after netsplits
818         when the people join back, the server will op them, but still the
819         bots op the people again, even if it was just done by the server.
820
821         Irssi has this feature that it sends a "massjoin" signal a while
822         after the real join. If someone has already opped the nick, you can
823         easily check it in the massjoin signal handler.
824
825         The default is to report maximum of 5 joins in one massjoin signal.
826         If the 5 joins don't come in 5 seconds, the signal is sent anyway.
827         You can change these with /SET massjoin_max_wait <milliseconds> and
828         /SET massjoin_max_joins <count>.
829
830
831  7. IRC commands and features (FIXME)
832
833  7.x Basic commands
834
835  7.x IRC operator commands
836
837  7.x Away features
838
839  8. Notify list
840
841         Notify list is generally used for knowing when someone you know
842         comes to IRC or leaves from IRC. Traditionally notify list can
843         handle only a list of nicks, no nick masks etc. I lost interest to
844         traditional notify lists long time ago, since the people I know
845         are in IRC all the time. So I made a bit more featureful notify
846         list:
847
848         /NOTIFY [-list] [-away] [-idle [minutes]] <mask> [network [network...]]
849
850             -away: Notifies about away-status changes
851             -idle: Notifies if idle time is first larger than <minutes>
852                    (default is hour) and then it drops down.
853             -list: Lists the notify list entries with all their settings
854             <mask>: Either a simple "nick" or "nick!*@*blah.org". The nick
855                     can't contain wildcards, but the user/host can.
856
857         /UNNOTIFY <mask>
858
859         /NOTIFY without any arguments displays if the people in notify
860         list are online or offline.
861
862
863  9. Text highlighting
864
865         Irssi supports highlighting lines that match the specified pattern.
866         You can also change the color of the nicks that match specified nick
867         mask, so you could for example show your friends' nicks with
868         different color.
869
870         /HILIGHT [-mask | -regexp | -word] [-nick] [-color <color>]
871                  [-level <level>] [-channels <channels>] <text>
872
873             -mask: Match only for nick, <text> is a nick mask
874             -regexp: <text> is a regular expression
875             -word: <text> must match to full words
876             -nick: Hilight only the nick, not the whole line
877             -color: Print the reply with <color>. color is in %code format
878                     (see docs/formats.txt)
879             -level: Match only for <level> messages, default is
880                     publics,msgs,notices,actions
881             -channels: Match only in <channels>
882
883         /DEHILIGHT <ref#> | <text>
884
885         /HILIGHT without any arguments displays list of the hilights.
886
887 If <color> is a
888         number, Irssi will treat it as a MIRC color code. You can also use
889         bolds (^B), underlines (^_) etc. as <color> if you like.
890
891
892  10. Ignoring
893
894  10.1 Manual ignoring
895
896         Irssi's ignoring options should be enough for everyone :)
897
898         /IGNORE [-regexp | -word] [-pattern <pattern>] [-replies] [-except]
899                 [-channels <channel>] <mask> <levels> <^levels>
900
901             -regexp: <pattern> is a regular expression
902             -word: <pattern> must match to full words
903             -pattern: <pattern> must match to the message's text
904             -replies: Ignore replies to nick in channels. For example
905                       "/IGNORE -replies *!*@*.fi PUBLIC" ignores everyone
906                       from Finland, but also anyone sending message
907                       "tofinnishnick: blahblah".
908             -except: *DON'T* ignore
909             -channels: Ignore only in channels
910             <mask>: Either a nick mask or list of channels
911             <levels>: List of levels to ignore
912             <^levels>: List of levels to NOT ignore
913                        (/ignore -except nick notices = /ignore nick ^notices)
914
915         /UNIGNORE <ref#> | <mask>
916
917         /IGNORE without any arguments displays list of ignores.
918
919         The best match always wins, so you can have:
920
921             /IGNORE * CTCPS
922             /IGNORE -except *!*@host.org CTCPS
923
924  10.2 Automatic ignoring
925
926         Irssi can automatically set ignores for people who flood you.
927         Currently you can autoignore MSGS, NOTICES, CTCPS and PUBLIC.
928         Actions are placed to either MSGS or PUBLIC. See section 3.3 for
929         definition of the flood.
930
931         /SET autoignore_time <seconds> specifies how long to ignore the
932         user.
933
934         /SET autoignore_levels <levels> specifies what levels to ignore
935         automatically, default is to ignore only CTCPS.
936
937
938  11. Logging
939
940  11.1 Basic logging
941
942         /LOG OPEN [-noopen] [-autoopen] [-targets <targets>]
943                   [-window] <filename> [<levels>]
944
945             -noopen: Create the entry to log list, but don't start logging
946             -autoopen: Automatically open this log file at startup
947             -targets: Log only in specified channels/nicks
948             -window: Log the active window
949             <filename>: File name where to log, it is parsed with
950                         strftime(), so %d=day, etc. see "man strftime" for
951                         more info. Irssi will automatically check every hour
952                         if log should be rotated.
953             <levels>: Defaults to ALL
954
955         /LOG CLOSE <ref#> | <fname> - Close log and remove from log list
956         /LOG START <ref#> | <fname> - Start logging to file
957         /LOG STOP <ref#> | <fname> - Stop logging to file
958         /LOG without any arguments displays the log list
959
960         /SET log_create_mode <mode> - Specifies what file mode to use with
961              the created log files. Default is 0644.
962
963         All of these are parsed with strftime():
964         /SET log_timestamp <text> - Specifies the time stamp format.
965              Default is "%H:%M ".
966         /SET log_open_string <text> - Text written to log when it's opened
967         /SET log_close_string <text> - Text written to log when it's closed
968         /SET log_day_changed <text> - Text written to log when day changes
969
970         NOTE: Log files are locked after opened, so two Irssis can't
971         accidentally try to write to the same log file.
972
973         Examples:
974
975         /LOG OPEN -targets cras ~/irclogs/cras.log MSGS
976           - Logs all messages from/to nick `cras'
977
978         /LOG OPEN -targets #linux ~/irclogs/linux/linux-%Y-%m-%d
979           - Logs all messages in channel #linux. Log is rotated daily, so
980             logs in 1. May 2000 goes to file "linux-2000-05-01", when the
981             day is changed, Irssi closes the log and starts logging to
982             "linux-2000-05-02" etc.
983
984  11.2 Window logging
985
986         /WINDOW LOG ON|OFF|TOGGLE [<filename>]
987
988         Start/stop logging the active window. This works exactly like
989         /LOG OPEN -window.
990
991         /WINDOW LOGFILE <filename>
992
993         Sets the default log file to use in the window, it can be
994         overridden with specifying the file name in /WINDOW LOG. If no file
995         name isn't given, Irssi defaults to ~/irc.log.<windowname> or
996         ~/irc.log.Window<ref#> if window doesn't have name.
997
998         Creates the entry to log list, same as /LOG OPEN -window -noopen.
999         Also, if /WINDOW LOG ON is used it starts logging to this file.
1000
1001  11.3 Automatic logging
1002
1003         This is the logging method that I had been asked to implement for
1004         ages, and it is really simple to use too. It logs only messages
1005         that have "targets", ie. private messages and channel specific
1006         messages (msgs, modes, topics, etc). WHOIS replies and such aren't
1007         logged. If you with to log them too, use the /LOG command.
1008
1009         So, when for example a private messages comes to you from "guy"
1010         nick, Irssi creates a log file ~/irclogs/guy.log for it. After few
1011         minutes of inactivity, the log file is closed.
1012
1013         /SET AUTOLOG ON|OFF|TOGGLE - Enable/disable autolog.
1014
1015         /SET AUTOLOG_LEVEL <level> - Specifies what levels to log, default
1016         is ALL.
1017
1018         /SET AUTOLOG_PATH <path> - expandos (see special_vars.txt) can be
1019         used, $0 is the target. If you are using multiple servers, it makes
1020         sense to use the server tag as part of the file name, for example
1021         ~/irclogs/$tag/$0.log (this is the default). The directories are
1022         created automatically.
1023
1024  11.4 Awaylog
1025
1026         Irssi logs specified messages when you're away. After you set
1027         yourself unaway, Irssi will display all the messages in the awaylog.
1028
1029         /SET awaylog_level <level> - Default is MSGS HILIGHT
1030         /SET awaylog_file <filename> - Default is ~/.irssi/away.log
1031
1032         You can disable this feature by setting awaylog_level to NONE.
1033
1034
1035 .. no, the docs end here, I got bored of writing these after a few days and 
1036 haven't touched these since then.