;; Revision 2.2 ????? kmk@cc.tut.fi
;; All kinds of fixes for 2.7. No exact log will be kept, probably.
;; Changed PING-waiter in irchat-server-open (?); adjusted 
;; handler for user@host!:s, changed JOIN-handler, written 353-
;; handler, ...

;; Revision 2.1.16 Dec ??, 1991, mta@cc.tut.fi, kmk@cc.tut.fi
;; irchat-Command-join no longer send JOIN for refocusing (was a temporary
;; idea, bad with invite-only channels). Fixed another bug with nil in
;; irchat-nick-alist. -kmk
;; Fixed MODE reply, now tells the channel right, forgot it last time...
;; Fixed irchat-ignore-changes to work properly, added check of it
;; to several places
;; Strange errors in places where completing-read is used with variables
;; that have same name on different functions, now changed all them to unique
;; names, hope this works...
;; Fixed irchat-Command-join to set irchat-current-channel as string,
;; not as intern
;;
;; Revision 2.1.15 Dec 4, 1991, kmk@cc.tut.fi
;; Fixed channel name matching, string-matches are now 
;; (string-equal (upcase ...) (upcase ...)). regexp-quote does
;; not add ^:s and $:s and therefore matches all kinds of things.
;; Fixed case insensitivity in refocusing by irchat-Command-join
;; and in other places that 'chnl is (get ...)'ed.
;; Part now shows "No channel" after the only channel is parted.
;; Kick now shows "No channel" after you are kicked from the only channel.
;; Mode show the channel the mode command is done for.
;; Join now works when you try to join "kaizzu" with wrong case.
;;
;; Revision 2.1.14 Nov 10, 1991, mta@cc.tut.fi
;; Fixed topic (now sends ':' before topic)
;; Fixed CTCP so now only 1 CTCP/message is processed
;; Fixed some typos
;;
;; Revision 2.1.13 Oct 19, 1991, mta@cc.tut.fi
;; Fixed irchat-clear-system to check that buffer exists before
;;       sending it to get-buffer
;;
;; Revision 2.1.12 Oct 18, 1991, mta@cc.tut.fi
;; Fixed 442 reply
;; Reset irchat-polling to 'start when we quit
;; Added buffer for received KILL messages
;; Added command for showing last received kill C-c|
;; Added buffer for messages from ignored people
;; Added buffer for wallops
;; Added variable to control showing of wallops, irchat-want-wallops
;;       default value is t
;; Added variable irchat-command-window-height
;; Cleaned exit, no hanging buffers
;; Fixed calling hooks (from tml), now you don't have to define
;;       hook as function and set its value to the variable
;;       actually that doesn't work anymore (fixed documentation too)
;;
;; Revision 2.1.11 Oct 15, 1991, mta@cc.tut.fi
;; Fixed typos & reformatted some
;; Fixed IRCPORT environment variable again, now it can be string or numeric
;; Fixed privmsg again
;; Added 4 commands (thanks to Masahiko MURAKAMI)
;;  - push (move last channel to current (first)) C-c>
;;  - pop  (move current (first) channel to last) C-c<
;;  following don't use completition when reading input, they
;;  can have many names as input, tell me what you think
;;  - ison (is any of specified people on)        C-cC-i
;;  - userhost (what host user uses)              C-cC-u
;; Fixed C-c$ to work (It has never worked before)
;; Added 302 reply
;;
;; Revision 2.1.10 Oct 15, 1991, mta@cc.tut.fi
;; Fixed typos
;; Suggestions from Masahiko MURAKAMI <murakami@nagao5.kuee.kyoto-u.ac.jp>
;; Fixed privmsg handling (string-match != string=)
;; Fixed part
;; Fixed getting IRCPORT environment variable
;; Fixed invite, now lets you to invite to other that your primary channel
;;
;; Revision 2.1.9 Oct 11, 1991, mta@cc.tut.fi
;; Fixed typos
;; Fixed kick so that it noticec when you are kicked off
;; Reformatted whoreply
;; 2.6.2 stuff
;; Added 303 reply (ISON reply)
;; Fixed 316 reply
;; Fixed 317 reply (IDLE time)
;; Added 319 reply
;;
;; Revision 2.1.8 Jul ?, 1991, mta@cc.tut.fi (never released)
;; Fixed erroneus 433 reply detection (fix mta, idea jtp)
;;
;; Revision 2.1.7 Jul 8, 1991, jtp@niksula.hut.fi
;; Added irchat-Command-reconfigure-windows, some keybindings
;; and changed little loading of variables.
;;
;; Revision 2.1.6 Jul 8, 1991, mta@cc.tut.fi, jtp@niksula.hut.fi
;; Fixed position of windows if irchat-want-traditional is t.
;; Added irchat-Command-load-vars to automatically load file
;; upon startup, no need to place irchat-stuff in .emacs.
;;
;; Revision 2.1.5 Jul 5, 1991, mta@cc.tut.fi
;; Fixed documentation of setting up irchat-handle- message -hook, it
;; is not a real hook, just a fake one, seesh.
;;
;; Revision 2.1.4 Jul 5, 1991, kmk@cc.tut.fi
;; Fixed irchat-command-quit by setting irchat-current-channel{,s} to nil
;; while quitting.
;; Resets irchat-current-channels to nil when starting, fixes a bug
;; that happened after quitting and restarting.
;; 
;; Revision 2.1.3 Jul 4, 1991 mta@cc.tut.fi
;; Fixed nickname handling, now it sets nickname as user sets
;; it but sets it back if we receive that change is impossible.
;; Links (364 reply) works on new servers.
;; Fixed fix-log :-)
;;
;; Revision 2.1.2 Jul 4, 1991 mta@cc.tut.fi
;; Fixed couple string-match and string= with nil argument
;;
;; Revision 2.1.1 Jul 3, 1991 kmk@cc.tut.fi,mta@cc.tut.fi
;; Fixed a couple of bugs (C-c j), improved documentation vastly.
;;
;; Revision 2.1
;; Major release for a long time. New functionality for 2.6.1, fixed
;; a whole bunch of bugs. CTCP added, and a whole lot of other things.
;; We skipped 2.0, there are versions 2.0alfa..2.0tau moving around.
;; This release supersedes all those.
;;
;; Revision 1.26  90/06/26  01:10:00  nam (Kim Nyberg)
;; Added simple one-buffer-mode, and a flag to start up
;; irchat with only the Dialogue-buffer visible. Some
;; bugs from 1.25beta are not fixed, maybe we should wait
;; for the official release of 2.5?
;; Added (or prefix in 421-handle by Kaizzu 11.7.1990 to get rid of old
;; messages from old servers.
;; 
;; Revision 1.25gamma 90/06/25 00:50:00 nam (Kim Nyberg)
;; Merged 1.23gamma and 1.25beta (there were some annoying diffs)
;; A remote version of RCS would be great, using an e-mail system,
;; so that we could avoid conflicting versions of irchat in the
;; future. If you find/have/know about such a beast, please mail
;; info to kny@niksula.hut.fi. Thank you.
;;
;; Revision 1.25beta 90/06/21 13:30:00 Kaizzu (Kai Kein{nen)
;; Added new numeric reply codes. Sorted out the part of code
;; with the numeric replys. To be done: better parsing of
;; MODE. One-buffer-mode. What else? Tell me!
;;
;; Revision 1.24alpha 90/06/07 14:20:00 Kaizzu (Kai Kein{nen)
;; Now, this tries to follow WiZ' ideas....  Changed irchat-Command-join
;; to understand strings.  Added irchat-channel-alist and
;; irchat-scan-channels to keep a list of channels. Removed unused
;; variables. Changed irchat-Command-list, irchat-Command-who,
;; irchat-Command-names to understand strings. C-u works, but no way
;; to say /who +foo with C-c w. Fixed regexps to like non-numerical
;; channels.
;;
;; Revision 1.23gamma 90/05/13 16:15:00 nam (Kim Nyberg)
;; 2.4 newline-bug fixed with an elegant solution by mta.
;; Fixed broadcast-bugs (private messages wont be broadcasted
;; any more) and minor /away-bug.
;; Empty lines bug fixed (not for privates, though, major argh!)
;; Added some of the earlier hooks to the main code.
;; Datestamps for priv messages when away added by cletus.
;; Revision 1.23beta 90/05/13 00:30:00 Kaizzu (Kai Kein{nen)
;; Fixed irchat to work with buggy 2.4. (:-))
;; Added some kind of handlers for new numeric messages.
;;
;; Revision 1.22 90/04/16  13:30:00  Kaizzu (Kai Kein{nen)
;; Changes by Kai Kein{nen based on long-time irritations and Easter.
;; Added handle for 314 (WHOWAS). Fixed some of the bugs in scrolling
;; back and forth. Automagic reconnect added. (No, it didn't exist
;; before.) Added a kludge to add a '_' in the nick in reconnects,
;; irchat is too fast otherwise. Fixed notice-handle so that is removes
;; extra away-notices. Added checking for IRCNAME.
;; Changes by Kim Nyberg, cleaning mta-topic, adding C-u to LIST and
;; TOPIC. 
;;
;; Revision 1.21  90/03/30  06:00:00  nam (Kim Nyberg)
;; Changes by Kim Nyberg with suggestions/code by Kai Kein{nen.
;; Yet another major release with bug fixes and new 'nice' features.
;; Cleaned up some kludges (channel-number for example), added a
;; broadcast-mode (suggested by Kari Syd{nmaanlakka, kts), fixed
;; annoying nickname-bug etc.
;;
;; Revision 1.20  90/03/19  19:30:00  nam (Kim Nyberg)
;; Changes by Jukka Partanen, Markku J{rvinen (mta) & Kim Nyberg.
;; Major release with bug fixes, customization-options. Handles more
;; numeric reply codes, keybindings & functions added. Tries to reconnect
;; automatically (still a major kludge).
;;
;; Revision 1.19  89/11/24  14:38:28  tml (Tor Lillqvist)
;; Changes by Jukka Partanen.
;;
;; Revision 1.18  89/09/18  10:59:53  tml (Tor Lillqvist)
;; Intermediate revision.  Works, but needs cleaning up.  Handles the new
;; numeric reply codes (at least those I have come across).
;;
;; Revision 1.17  89/07/12  15:49:43  tml (Tor Lillqvist)
;; Added handling of NOTICE messages.
;;
;; Revision 1.16  89/07/11  12:39:42  tml (Tor Lillqvist)
;; Fixed killing:  We used to get empty lines for each message from a killed
;; user.  Use irchat-author-nickname also when sending the greeting.
;;
;; Revision 1.15  89/07/10  11:14:45  tml (Tor Lillqvist)
;; Added automatic sending of an greeting to the author, telling him
;; what version of irchat this is.
;;
;; Revision 1.14  89/07/10  10:50:13  tml (Tor Lillqvist)
;; Fixed irchat-Command-redisplay to work like I want (finally...).
;;
;; Revision 1.10  89/07/10  00:08:21  tml (Tor Lillqvist)
;; Added irchat-Command-redisplay (C-c C-l) to get dialogue window back
;; without having to do C-x 4 b C-x o.  Added help for the generic
;; command.  Fixes a bug that caused server messages handled in the same
;; chunk to get a wrong prefix (the old value stayed around).
;;
;; Revision 1.9  89/07/05  15:25:02  tml (Tor Lillqvist)
;; Oops.  Must have (goto-char (point-max)) in irchat-own-message.
;;
;; Revision 1.8  89/07/05  14:57:51  tml (Tor Lillqvist)
;; Freezing the dialogue window now works better: if frozen, we use
;; save-excursion.  Space and Delete scrolls in the dialogue window.
;; Don't print "private message from nil".
;; 
;; Revision 1.7  89/06/20  10:10:52  tml (Tor Lillqvist)
;; Cosmetic changes; removed the (unused) hash table functions; added 
;; my email address.
;; 
;; Revision 1.6  89/06/15  17:25:20  tml (Tor Lillqvist)
;; Now byte-compiles.  (The byte-compiler didn't like lambda expressions.)
;; 
;; Revision 1.5  89/06/15  14:11:08  tml (Tor Lillqvist)
;; Added the freeze command to stop automatic scrolling of the dialogue
;; window.  Added an automatic greeting to the wait command.
;; 
;; Revision 1.4  89/06/14  20:41:36  tml (Tor Lillqvist)
;; More suggestions from mta@tut.fi.
;; Fixed a bug: if a message had nothing after the command word, eg QUIT,
;; it was handled incorrectly.
;; 
;; Revision 1.3  89/06/08  17:59:20  tml (Tor Lillqvist)
;; Suggestions from Markku Jarvinen <mta@tut.fi>:  The Command buffer
;; isn't erased after each message you enter.  You can enter a numeric
;; argument to WHO.  C-c c send the current line to the server (for 
;; compatibility with another Emacs IRC client).  The mode line tells
;; which channel you are on.  The environment variable IRCNICK is checked.
;; 
;; Revision 1.2  89/06/08  14:26:48  tml (Tor Lillqvist)
;; Many enhancements:  We now poll the server periodically with WHO
;; messages, and keep a list of the nicknames on IRC (used for completion
;; when sending private messages or fingering (WHOIS).  Added a WAIT 
;; command, which marks a nickname as waited for, and when we notice that
;; she is present, we inform the loser.  Etc.
;; 
;; Revision 1.1  89/06/05  19:11:41  tml (Tor Lillqvist)
;; Initial revision
;; 

;; This is a set of Emacs-Lisp commands and support functions for
;; the Internet Relay Chat protocol, IRC.
;;
;; The entry point to IRChat is the command irchat.
;;
;; If autoloading then the line:
;;   (autoload 'irchat "irchat" nil t)
;; should appear in a user's .emacs or in default.el in the lisp
;; directory of the Emacs distribution.
;;
;; Much code borrowed from GNUS, thanks to Masanobu Umeda.

;; Revision 2.2 ????? kmk@cc.tut.fi
;; All kinds of fixes for 2.7. No exact log will be kept, probably.
;; Changed PING-waiter in irchat-server-open (?); adjusted 
;; handler for user@host!:s, changed JOIN-handler, written 353-
;; handler, ...

;; Revision 2.1.16 Dec ??, 1991, mta@cc.tut.fi, kmk@cc.tut.fi
;; irchat-Command-join no longer send JOIN for refocusing (was a temporary
;; idea, bad with invite-only channels). Fixed another bug with nil in
;; irchat-nick-alist. -kmk
;; Fixed MODE reply, now tells the channel right, forgot it last time...
;; Fixed irchat-ignore-changes to work properly, added check of it
;; to several places
;; Strange errors in places where completing-read is used with variables
;; that have same name on different functions, now changed all them to unique
;; names, hope this works...
;; Fixed irchat-Command-join to set irchat-current-channel as string,
;; not as intern
;;
;; Revision 2.1.15 Dec 4, 1991, kmk@cc.tut.fi
;; Fixed channel name matching, string-matches are now 
;; (string-equal (upcase ...) (upcase ...)). regexp-quote does
;; not add ^:s and $:s and therefore matches all kinds of things.
;; Fixed case insensitivity in refocusing by irchat-Command-join
;; and in other places that 'chnl is (get ...)'ed.
;; Part now shows "No channel" after the only channel is parted.
;; Kick now shows "No channel" after you are kicked from the only channel.
;; Mode show the channel the mode command is done for.
;; Join now works when you try to join "kaizzu" with wrong case.
;;
;; Revision 2.1.14 Nov 10, 1991, mta@cc.tut.fi
;; Fixed topic (now sends ':' before topic)
;; Fixed CTCP so now only 1 CTCP/message is processed
;; Fixed some typos
;;
;; Revision 2.1.13 Oct 19, 1991, mta@cc.tut.fi
;; Fixed irchat-clear-system to check that buffer exists before
;;       sending it to get-buffer
;;
;; Revision 2.1.12 Oct 18, 1991, mta@cc.tut.fi
;; Fixed 442 reply
;; Reset irchat-polling to 'start when we quit
;; Added buffer for received KILL messages
;; Added command for showing last received kill C-c|
;; Added buffer for messages from ignored people
;; Added buffer for wallops
;; Added variable to control showing of wallops, irchat-want-wallops
;;       default value is t
;; Added variable irchat-command-window-height
;; Cleaned exit, no hanging buffers
;; Fixed calling hooks (from tml), now you don't have to define
;;       hook as function and set its value to the variable
;;       actually that doesn't work anymore (fixed documentation too)
;;
;; Revision 2.1.11 Oct 15, 1991, mta@cc.tut.fi
;; Fixed typos & reformatted some
;; Fixed IRCPORT environment variable again, now it can be string or numeric
;; Fixed privmsg again
;; Added 4 commands (thanks to Masahiko MURAKAMI)
;;  - push (move last channel to current (first)) C-c>
;;  - pop  (move current (first) channel to last) C-c<
;;  following don't use completition when reading input, they
;;  can have many names as input, tell me what you think
;;  - ison (is any of specified people on)        C-cC-i
;;  - userhost (what host user uses)              C-cC-u
;; Fixed C-c$ to work (It has never worked before)
;; Added 302 reply
;;
;; Revision 2.1.10 Oct 15, 1991, mta@cc.tut.fi
;; Fixed typos
;; Suggestions from Masahiko MURAKAMI <murakami@nagao5.kuee.kyoto-u.ac.jp>
;; Fixed privmsg handling (string-match != string=)
;; Fixed part
;; Fixed getting IRCPORT environment variable
;; Fixed invite, now lets you to invite to other that your primary channel
;;
;; Revision 2.1.9 Oct 11, 1991, mta@cc.tut.fi
;; Fixed typos
;; Fixed kick so that it noticec when you are kicked off
;; Reformatted whoreply
;; 2.6.2 stuff
;; Added 303 reply (ISON reply)
;; Fixed 316 reply
;; Fixed 317 reply (IDLE time)
;; Added 319 reply
;;
;; Revision 2.1.8 Jul ?, 1991, mta@cc.tut.fi (never released)
;; Fixed erroneus 433 reply detection (fix mta, idea jtp)
;;
;; Revision 2.1.7 Jul 8, 1991, jtp@niksula.hut.fi
;; Added irchat-Command-reconfigure-windows, some keybindings
;; and changed little loading of variables.
;;
;; Revision 2.1.6 Jul 8, 1991, mta@cc.tut.fi, jtp@niksula.hut.fi
;; Fixed position of windows if irchat-want-traditional is t.
;; Added irchat-Command-load-vars to automatically load file
;; upon startup, no need to place irchat-stuff in .emacs.
;;
;; Revision 2.1.5 Jul 5, 1991, mta@cc.tut.fi
;; Fixed documentation of setting up irchat-handle- message -hook, it
;; is not a real hook, just a fake one, seesh.
;;
;; Revision 2.1.4 Jul 5, 1991, kmk@cc.tut.fi
;; Fixed irchat-command-quit by setting irchat-current-channel{,s} to nil
;; while quitting.
;; Resets irchat-current-channels to nil when starting, fixes a bug
;; that happened after quitting and restarting.
;; 
;; Revision 2.1.3 Jul 4, 1991 mta@cc.tut.fi
;; Fixed nickname handling, now it sets nickname as user sets
;; it but sets it back if we receive that change is impossible.
;; Links (364 reply) works on new servers.
;; Fixed fix-log :-)
;;
;; Revision 2.1.2 Jul 4, 1991 mta@cc.tut.fi
;; Fixed couple string-match and string= with nil argument
;;
;; Revision 2.1.1 Jul 3, 1991 kmk@cc.tut.fi,mta@cc.tut.fi
;; Fixed a couple of bugs (C-c j), improved documentation vastly.
;;
;; Revision 2.1
;; Major release for a long time. New functionality for 2.6.1, fixed
;; a whole bunch of bugs. CTCP added, and a whole lot of other things.
;; We skipped 2.0, there are versions 2.0alfa..2.0tau moving around.
;; This release supersedes all those.
;;
;; Revision 1.26  90/06/26  01:10:00  nam (Kim Nyberg)
;; Added simple one-buffer-mode, and a flag to start up
;; irchat with only the Dialogue-buffer visible. Some
;; bugs from 1.25beta are not fixed, maybe we should wait
;; for the official release of 2.5?
;; Added (or prefix in 421-handle by Kaizzu 11.7.1990 to get rid of old
;; messages from old servers.
;; 
;; Revision 1.25gamma 90/06/25 00:50:00 nam (Kim Nyberg)
;; Merged 1.23gamma and 1.25beta (there were some annoying diffs)
;; A remote version of RCS would be great, using an e-mail system,
;; so that we could avoid conflicting versions of irchat in the
;; future. If you find/have/know about such a beast, please mail
;; info to kny@niksula.hut.fi. Thank you.
;;
;; Revision 1.25beta 90/06/21 13:30:00 Kaizzu (Kai Kein{nen)
;; Added new numeric reply codes. Sorted out the part of code
;; with the numeric replys. To be done: better parsing of
;; MODE. One-buffer-mode. What else? Tell me!
;;
;; Revision 1.24alpha 90/06/07 14:20:00 Kaizzu (Kai Kein{nen)
;; Now, this tries to follow WiZ' ideas....  Changed irchat-Command-join
;; to understand strings.  Added irchat-channel-alist and
;; irchat-scan-channels to keep a list of channels. Removed unused
;; variables. Changed irchat-Command-list, irchat-Command-who,
;; irchat-Command-names to understand strings. C-u works, but no way
;; to say /who +foo with C-c w. Fixed regexps to like non-numerical
;; channels.
;;
;; Revision 1.23gamma 90/05/13 16:15:00 nam (Kim Nyberg)
;; 2.4 newline-bug fixed with an elegant solution by mta.
;; Fixed broadcast-bugs (private messages wont be broadcasted
;; any more) and minor /away-bug.
;; Empty lines bug fixed (not for privates, though, major argh!)
;; Added some of the earlier hooks to the main code.
;; Datestamps for priv messages when away added by cletus.
;; Revision 1.23beta 90/05/13 00:30:00 Kaizzu (Kai Kein{nen)
;; Fixed irchat to work with buggy 2.4. (:-))
;; Added some kind of handlers for new numeric messages.
;;
;; Revision 1.22 90/04/16  13:30:00  Kaizzu (Kai Kein{nen)
;; Changes by Kai Kein{nen based on long-time irritations and Easter.
;; Added handle for 314 (WHOWAS). Fixed some of the bugs in scrolling
;; back and forth. Automagic reconnect added. (No, it didn't exist
;; before.) Added a kludge to add a '_' in the nick in reconnects,
;; irchat is too fast otherwise. Fixed notice-handle so that is removes
;; extra away-notices. Added checking for IRCNAME.
;; Changes by Kim Nyberg, cleaning mta-topic, adding C-u to LIST and
;; TOPIC. 
;;
;; Revision 1.21  90/03/30  06:00:00  nam (Kim Nyberg)
;; Changes by Kim Nyberg with suggestions/code by Kai Kein{nen.
;; Yet another major release with bug fixes and new 'nice' features.
;; Cleaned up some kludges (channel-number for example), added a
;; broadcast-mode (suggested by Kari Syd{nmaanlakka, kts), fixed
;; annoying nickname-bug etc.
;;
;; Revision 1.20  90/03/19  19:30:00  nam (Kim Nyberg)
;; Changes by Jukka Partanen, Markku J{rvinen (mta) & Kim Nyberg.
;; Major release with bug fixes, customization-options. Handles more
;; numeric reply codes, keybindings & functions added. Tries to reconnect
;; automatically (still a major kludge).
;;
;; Revision 1.19  89/11/24  14:38:28  tml (Tor Lillqvist)
;; Changes by Jukka Partanen.
;;
;; Revision 1.18  89/09/18  10:59:53  tml (Tor Lillqvist)
;; Intermediate revision.  Works, but needs cleaning up.  Handles the new
;; numeric reply codes (at least those I have come across).
;;
;; Revision 1.17  89/07/12  15:49:43  tml (Tor Lillqvist)
;; Added handling of NOTICE messages.
;;
;; Revision 1.16  89/07/11  12:39:42  tml (Tor Lillqvist)
;; Fixed killing:  We used to get empty lines for each message from a killed
;; user.  Use irchat-author-nickname also when sending the greeting.
;;
;; Revision 1.15  89/07/10  11:14:45  tml (Tor Lillqvist)
;; Added automatic sending of an greeting to the author, telling him
;; what version of irchat this is.
;;
;; Revision 1.14  89/07/10  10:50:13  tml (Tor Lillqvist)
;; Fixed irchat-Command-redisplay to work like I want (finally...).
;;
;; Revision 1.10  89/07/10  00:08:21  tml (Tor Lillqvist)
;; Added irchat-Command-redisplay (C-c C-l) to get dialogue window back
;; without having to do C-x 4 b C-x o.  Added help for the generic
;; command.  Fixes a bug that caused server messages handled in the same
;; chunk to get a wrong prefix (the old value stayed around).
;;
;; Revision 1.9  89/07/05  15:25:02  tml (Tor Lillqvist)
;; Oops.  Must have (goto-char (point-max)) in irchat-own-message.
;;
;; Revision 1.8  89/07/05  14:57:51  tml (Tor Lillqvist)
;; Freezing the dialogue window now works better: if frozen, we use
;; save-excursion.  Space and Delete scrolls in the dialogue window.
;; Don't print "private message from nil".
;; 
;; Revision 1.7  89/06/20  10:10:52  tml (Tor Lillqvist)
;; Cosmetic changes; removed the (unused) hash table functions; added 
;; my email address.
;; 
;; Revision 1.6  89/06/15  17:25:20  tml (Tor Lillqvist)
;; Now byte-compiles.  (The byte-compiler didn't like lambda expressions.)
;; 
;; Revision 1.5  89/06/15  14:11:08  tml (Tor Lillqvist)
;; Added the freeze command to stop automatic scrolling of the dialogue
;; window.  Added an automatic greeting to the wait command.
;; 
;; Revision 1.4  89/06/14  20:41:36  tml (Tor Lillqvist)
;; More suggestions from mta@tut.fi.
;; Fixed a bug: if a message had nothing after the command word, eg QUIT,
;; it was handled incorrectly.
;; 
;; Revision 1.3  89/06/08  17:59:20  tml (Tor Lillqvist)
;; Suggestions from Markku Jarvinen <mta@tut.fi>:  The Command buffer
;; isn't erased after each message you enter.  You can enter a numeric
;; argument to WHO.  C-c c send the current line to the server (for 
;; compatibility with another Emacs IRC client).  The mode line tells
;; which channel you are on.  The environment variable IRCNICK is checked.
;; 
;; Revision 1.2  89/06/08  14:26:48  tml (Tor Lillqvist)
;; Many enhancements:  We now poll the server periodically with WHO
;; messages, and keep a list of the nicknames on IRC (used for completion
;; when sending private messages or fingering (WHOIS).  Added a WAIT 
;; command, which marks a nickname as waited for, and when we notice that
;; she is present, we inform the loser.  Etc.
;; 
;; Revision 1.1  89/06/05  19:11:41  tml (Tor Lillqvist)
;; Initial revision
;; 

;; This is a set of Emacs-Lisp commands and support functions for
;; the Internet Relay Chat protocol, IRC.
;;
;; The entry point to IRChat is the command irchat.
;;
;; If autoloading then the line:
;;   (autoload 'irchat "irchat" nil t)
;; should appear in a user's .emacs or in default.el in the lisp
;; directory of the Emacs distribution.
;;
;; Much code borrowed from GNUS, thanks to Masanobu Umeda.

