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