Commits

Anonymous committed e7c06cb

packages: Syncing erc up with 4.0 1.637

-------------------- ChangeLog entries follow: --------------------

xemacs-packages/erc/ChangeLog addition:

2004-03-11 Adrian Aichner <adrian@xemacs.org>

* Full sync with upstream version 4.0 Revision 1.637.
* AUTHORS:
* CREDITS:
* Makefile (AUTHOR_VERSION):
* Makefile (DATA_FILES):
* Makefile.upstream (TESTING): New.
* erc-autoaway.el:
* erc-autoaway.el (erc-autoaway-use-emacs-idle): New.
* erc-autoaway.el (erc-auto-discard-away):
* erc-autojoin.el (erc-autojoin-version):
* erc-bbdb.el (erc-bbdb-version):
* erc-button.el:
* erc-button.el (erc-button-version):
* erc-button.el (erc-button-alist):
* erc-button.el (erc-emacswiki-lisp-url): New.
* erc-button.el (erc-button-add-buttons):
* erc-button.el (erc-button-add-buttons-1):
* erc-button.el (erc-button-add-nickname-buttons): New.
* erc-button.el (erc-button-remove-old-buttons):
* erc-button.el (erc-button-add-button):
* erc-button.el (erc-button-add-face):
* erc-button.el (erc-button-press-button):
* erc-button.el (erc-browse-emacswiki-lisp): New.
* erc-button.el (erc-nick-popup-alist):
* erc-button.el (erc-nick-popup):
* erc-chess.el (erc-chess-version):
* erc-chess.el (erc-chess-partner):
* erc-chess.el (erc-chess-handler):
* erc-compat.el (erc-compat-version):
* erc-complete.el (erc-complete-version):
* erc-dcc.el:
* erc-dcc.el (erc-dcc-version):
* erc-dcc.el (pcomplete/erc-mode/DCC):
* erc-dcc.el (erc-dcc-entry-data): New.
* erc-dcc.el (erc-dcc-byte-count): New.
* erc-dcc.el (erc-dcc-get-file):
* erc-dcc.el (erc-dcc-from):
* erc-dcc.el (erc-dcc-from)): New.
* erc-dcc.el (erc-dcc-unprocessed-output)): New.
* erc-dcc.el (erc-dcc-chat-setup):
* erc-ezbounce.el:
* erc-ezbounce.el (erc-ezb-version):
* erc-ezbounce.el (erc-ezb-session-list):
* erc-fill.el (erc-fill-version):
* erc-ibuffer.el (erc-ibuffer-version):
* erc-ibuffer.el (erc-modified):
* erc-ibuffer.el (erc-voice):
* erc-imenu.el (erc-imenu-version):
* erc-lang.el:
* erc-lang.el (erc):
* erc-list.el:
* erc-list.el (erc-nets):
* erc-list.el (erc-chanlist-header-face): New.
* erc-list.el (erc-chanlist-odd-line-face): New.
* erc-list.el (erc-chanlist-even-line-face): New.
* erc-list.el (erc-chanlist-sort-state):
* erc-list.el (erc-chanlist-mode):
* erc-list.el (erc-cmd-LIST):
* erc-list.el (erc-chanlist):
* erc-log.el (erc-save-buffer-in-logs):
* erc-macs.el (erc-victims): New.
* erc-macs.el (erc-channel-victims): New.
* erc-match.el:
* erc-match.el (erc-match-version):
* erc-match.el (erc-current-nick-highlight-type):
* erc-match.el (erc-add-entry-to-list):
* erc-match.el (erc-remove-entry-from-list):
* erc-match.el (erc-add-pal):
* erc-match.el (erc-add-fool):
* erc-match.el (erc-match-directed-at-fool-p):
* erc-match.el (erc-match-message):
* erc-menu.el (erc-menu-definition):
* erc-nets.el:
* erc-nets.el (erc-nets-version): New.
* erc-nets.el (erc-server-alist):
* erc-nets.el (erc-networks-alist):
* erc-nets.el (erc-determine-network): New.
* erc-nets.el (erc-network): New.
* erc-nets.el (erc-current-network): New.
* erc-nets.el (erc-network-name): New.
* erc-nets.el (erc-set-network-name): New.
* erc-nets.el (erc-unset-network-name): New.
* erc-nets.el (erc-ports-list):
* erc-nets.el (erc-server-select):
* erc-nets.el (erc-settings):
* erc-nets.el (pals):
* erc-netsplit.el (erc-netsplit-version):
* erc-nickserv.el:
* erc-nickserv.el (erc-nets):
* erc-nickserv.el (erc-nickserv-version):
* erc-nickserv.el (erc-nickserv-alist):
* erc-nickserv.el (erc-nickserv-identify-autodetect):
* erc-nickserv.el (erc-nickserv-identify):
* erc-nickserv.el (erc-networks): Removed.
* erc-nickserv.el (erc-current-network): Removed.
* erc-notify.el (erc-nets):
* erc-page.el (erc-cmd-PAGE):
* erc-pcomplete.el:
* erc-pcomplete.el (time-date):
* erc-pcomplete.el (erc-pcomplete-version):
* erc-pcomplete.el (erc-pcomplete-order-nickname-completions): New.
* erc-pcomplete.el (pcomplete-erc-ops):
* erc-pcomplete.el (pcomplete-erc-not-ops):
* erc-pcomplete.el (pcomplete-erc-nicks):
* erc-pcomplete.el (pcomplete-erc-all-nicks):
* erc-pcomplete.el (erc-pcomplete-bring-channel-member-to-front): Removed.
* erc-pcomplete.el (erc-pcomplete-ordering-PRIVMSG-handler): Removed.
* erc-replace.el (erc-replace-version):
* erc-ring.el (erc-ring-version):
* erc-ring.el (erc-input-ring):
* erc-ring.el (erc-input-ring-index):
* erc-ring.el (erc-input-ring-setup):
* erc-ring.el (erc-replace-current-command):
* erc-speedbar.el (erc-speedbar-expand-channel):
* erc-speedbar.el (erc-speedbar-sort-channel-members): Removed.
* erc-speedbar.el (erc-speedbar-insert-user):
* erc-stamp.el:
* erc-stamp.el (erc-stamp-version):
* erc-stamp.el (erc-timestamp-intangible): New.
* erc-stamp.el (erc-timestamp-last-inserted): New.
* erc-stamp.el (erc-format-timestamp):
* erc-track.el:
* erc-track.el (erc-track-version):
* erc-track.el (erc-track-priority-faces-only): New.
* erc-track.el (Note): New.
* erc-track.el (erc-track-modified-channels):
* erc.el:
* erc.el (erc-version-string):
* erc.el (erc-manual-set-nick-on-bad-nick-p): New.
* erc.el (erc-send-whitespace-lines): New.
* erc.el (erc-disconnected-hook): New.
* erc.el (erc-complete-functions): New.
* erc.el (erc-quit-hook): New.
* erc.el (erc-part-hook): New.
* erc.el (erc-kick-hook): New.
* erc.el (erc-connect-pre-hook): New.
* erc.el (erc-process): New.
* erc.el (channel-members): Removed.
* erc.el (erc-channel-users): New.
* erc.el (erc-server-users): New.
* erc.el (erc-downcase): New.
* erc.el ((erc-server-user (:type vector) :named)):
* erc.el ((erc-server-user): New.
* erc.el ((erc-channel-user): New.
* erc.el (erc-get-channel-user): New.
* erc.el (erc-get-server-user): New.
* erc.el (erc-add-server-user): New.
* erc.el (erc-remove-server-user): New.
* erc.el (erc-change-user-nickname): New.
* erc.el (erc-remove-channel-user): New.
* erc.el (erc-remove-user): New.
* erc.el (erc-remove-channel-users): New.
* erc.el (erc-channel-user-op-p): New.
* erc.el (erc-channel-user-voice-p): New.
* erc.el (erc-get-channel-user-list): New.
* erc.el (erc-get-server-nickname-list): New.
* erc.el (erc-get-channel-nickname-list): New.
* erc.el (erc-get-server-nickname-alist): New.
* erc.el (erc-get-channel-nickname-alist): New.
* erc.el (erc-sort-channel-users-by-activity): New.
* erc.el (erc-input-line-position): New.
* erc.el (erc-ignore-list):
* erc.el (erc-mode):
* erc.el (erc-with-buffer):
* erc.el (erc-get-buffer):
* erc.el (erc-iswitchb):
* erc.el (erc-buffer-list-with-nick):
* erc.el (erc-default-recipients):
* erc.el (erc-network-name): Removed.
* erc.el (erc-session-user-full-name):
* erc.el (current-nick):
* erc.el (channel-user-limit):
* erc.el (last-peers):
* erc.el (invitation):
* erc.el (away):
* erc.el (channel-list):
* erc.el (last-sent-time):
* erc.el (last-ping-time):
* erc.el (last-ctcp-time):
* erc.el (erc-lines-sent):
* erc.el (erc-bytes-sent):
* erc.el (erc-announced-server-name): Removed.
* erc.el (quitting):
* erc.el (bad-nick):
* erc.el (erc-logged-in):
* erc.el (erc-default-nicks):
* erc.el (erc-nick-change-attempt-count): New.
* erc.el (erc-previous-read): New.
* erc.el (erc):
* erc.el (erc-split-multiline):
* erc.el (erc-process-sentinel):
* erc.el (erc-display-line-1):
* erc.el (erc-update-undo-list): New.
* erc.el (erc-is-valid-nick-p):
* erc.el (erc-scroll-to-bottom):
* erc.el (erc-add-scroll-to-bottom):
* erc.el (erc-send-input-line-function): New.
* erc.el (erc-send-input-line):
* erc.el ((fboundp 'help-function-arglist)):
* erc.el (erc-cmd-OPS):
* erc.el (erc-cmd-COUNTRY):
* erc.el (erc-script-args): New.
* erc.el (erc-cmd-WHOAMI): New.
* erc.el (erc-server-364-hook): New.
* erc.el (erc-server-365-hook): New.
* erc.el (erc-server-367-hook): New.
* erc.el (erc-server-368-hook): New.
* erc.el (channel-banlist): New.
* erc.el (erc-server-vectors): New.
* erc.el (erc-duplicates): New.
* erc.el (erc-query):
* erc.el (erc-nickname-in-use):
* erc.el (erc-server-KICK):
* erc.el (erc-server-NICK):
* erc.el (erc-server-PART):
* erc.el (erc-lag): New.
* erc.el (erc-setup-periodical-server-ping):
* erc.el (erc-format-nick):
* erc.el (erc-format-@nick):
* erc.el (erc-server-PRIVMSG-or-NOTICE):
* erc.el (erc-server-QUIT):
* erc.el (erc-server-version): New.
* erc.el (erc-server-001): New.
* erc.el (erc-server-311-or-314):
* erc.el (erc-server-317):
* erc.el (erc-server-315-hook): Removed.
* erc.el (erc-server-319):
* erc.el (erc-server-318-hook): Removed.
* erc.el (erc-server-352):
* erc.el (erc-banlist-store):
* erc.el (erc-server-369-hook): Removed.
* erc.el (erc-channel-end-receiving-names):
* erc.el (erc-channel-receive-names):
* erc.el (erc-update-user-nick): New.
* erc.el (erc-update-user): New.
* erc.el (erc-update-current-channel-member):
* erc.el (erc-update-channel-member):
* erc.el (erc-remove-current-channel-member):
* erc.el (erc-remove-channel-member):
* erc.el (erc-update-channel-topic):
* erc.el (erc-set-modes):
* erc.el (erc-get-current-channel-members): Removed.
* erc.el (erc-get-channel-members): Removed.
* erc.el (erc-update-modes):
* erc.el (erc-update-channel-limit):
* erc.el (erc-find-channel-info-buffer):
* erc.el (erc-update-channel-info-buffer):
* erc.el (erc-update-channel-info-buffers):
* erc.el (erc-remove-member-all-channels): Removed.
* erc.el (erc-update-member-all-channels): Removed.
* erc.el (erc-beg-of-input-line):
* erc.el (erc-end-of-input-line):
* erc.el (erc-send-current-line):
* erc.el (erc-ignored-reply-p):
* erc.el (erc-channel-member-to-user-spec): Removed.
* erc.el (erc-user-spec): New.
* erc.el (erc-nick-at-point):
* erc.el (erc-operator-p): Removed.
* erc.el (erc-mode-line-away-status-format): New.
* erc.el (erc-prepare-mode-line-format):
* erc.el (erc-update-mode-line-buffer):
* erc.el (erc-kill-buffer-function):

Comments (0)

Files changed (35)

 Tijs van Bakel	<smoke@wanadoo.nl>	smoke
 Brian P Templeton	<bpt@tunes.org>		plovre
 John Wiegley	<johnw@gnu.org>	jwiegley
-disumu	<disumu@users.sourceforge.net>	disumu
+Diane Murray	<dsm@muenster.de>	disumu
 Benjamin Drieu	<benj@debian.org>	benj2
 Jorgen Schaefer	<forcer@users.sourceforge.net>	forcer
 Francis Litterio	<franl@users.sourceforge.net>	franl
 Damien Elmes		<erc@repose.cx>	resolve
 Lawrence Mitchell	<wence@gmx.li>	wencem
 Sandra Jean Chua	<sacha@free.net.ph>	sachachua
+Jeremy Bertram Maitin-Shepard	<jbms@gentoo.org>	jbms
 Tijs van Bakel <smoke@wanadoo.nl>:
   * helped a lot in crucial rewriting phase
 
-D. S. Murray <dsm@muenster.de>:
-  * Miscellaneous development
+Diane Murray <dsm@muenster.de>:
+  * Miscellaneous development, additions, bug fixes
+  * erc-nickserv.el
 
 Gergely Nagy <algernon@debian.org>
   * Debian package maintainer
 Jeremy Maitin-Shepard <jbms@attbi.com>:
   * Modified erc.el and erc-pcomplete.el to include time-sensitive
     completion.
+  * Changed ERC to use hash tables instead of the `channel-members'
+    alist.
     
 ----
 
+2004-03-11  Adrian Aichner  <adrian@xemacs.org>
+
+	* Full sync with upstream version 4.0 Revision 1.637.
+	* AUTHORS:
+	* CREDITS:
+	* Makefile (AUTHOR_VERSION):
+	* Makefile (DATA_FILES):
+	* Makefile.upstream (TESTING): New.
+	* erc-autoaway.el:
+	* erc-autoaway.el (erc-autoaway-use-emacs-idle): New.
+	* erc-autoaway.el (erc-auto-discard-away):
+	* erc-autojoin.el (erc-autojoin-version):
+	* erc-bbdb.el (erc-bbdb-version):
+	* erc-button.el:
+	* erc-button.el (erc-button-version):
+	* erc-button.el (erc-button-alist):
+	* erc-button.el (erc-emacswiki-lisp-url): New.
+	* erc-button.el (erc-button-add-buttons):
+	* erc-button.el (erc-button-add-buttons-1):
+	* erc-button.el (erc-button-add-nickname-buttons): New.
+	* erc-button.el (erc-button-remove-old-buttons):
+	* erc-button.el (erc-button-add-button):
+	* erc-button.el (erc-button-add-face):
+	* erc-button.el (erc-button-press-button):
+	* erc-button.el (erc-browse-emacswiki-lisp): New.
+	* erc-button.el (erc-nick-popup-alist):
+	* erc-button.el (erc-nick-popup):
+	* erc-chess.el (erc-chess-version):
+	* erc-chess.el (erc-chess-partner):
+	* erc-chess.el (erc-chess-handler):
+	* erc-compat.el (erc-compat-version):
+	* erc-complete.el (erc-complete-version):
+	* erc-dcc.el:
+	* erc-dcc.el (erc-dcc-version):
+	* erc-dcc.el (pcomplete/erc-mode/DCC):
+	* erc-dcc.el (erc-dcc-entry-data): New.
+	* erc-dcc.el (erc-dcc-byte-count): New.
+	* erc-dcc.el (erc-dcc-get-file):
+	* erc-dcc.el (erc-dcc-from):
+	* erc-dcc.el (erc-dcc-from)): New.
+	* erc-dcc.el (erc-dcc-unprocessed-output)): New.
+	* erc-dcc.el (erc-dcc-chat-setup):
+	* erc-ezbounce.el:
+	* erc-ezbounce.el (erc-ezb-version):
+	* erc-ezbounce.el (erc-ezb-session-list):
+	* erc-fill.el (erc-fill-version):
+	* erc-ibuffer.el (erc-ibuffer-version):
+	* erc-ibuffer.el (erc-modified):
+	* erc-ibuffer.el (erc-voice):
+	* erc-imenu.el (erc-imenu-version):
+	* erc-lang.el:
+	* erc-lang.el (erc):
+	* erc-list.el:
+	* erc-list.el (erc-nets):
+	* erc-list.el (erc-chanlist-header-face): New.
+	* erc-list.el (erc-chanlist-odd-line-face): New.
+	* erc-list.el (erc-chanlist-even-line-face): New.
+	* erc-list.el (erc-chanlist-sort-state):
+	* erc-list.el (erc-chanlist-mode):
+	* erc-list.el (erc-cmd-LIST):
+	* erc-list.el (erc-chanlist):
+	* erc-log.el (erc-save-buffer-in-logs):
+	* erc-macs.el (erc-victims): New.
+	* erc-macs.el (erc-channel-victims): New.
+	* erc-match.el:
+	* erc-match.el (erc-match-version):
+	* erc-match.el (erc-current-nick-highlight-type):
+	* erc-match.el (erc-add-entry-to-list):
+	* erc-match.el (erc-remove-entry-from-list):
+	* erc-match.el (erc-add-pal):
+	* erc-match.el (erc-add-fool):
+	* erc-match.el (erc-match-directed-at-fool-p):
+	* erc-match.el (erc-match-message):
+	* erc-menu.el (erc-menu-definition):
+	* erc-nets.el:
+	* erc-nets.el (erc-nets-version): New.
+	* erc-nets.el (erc-server-alist):
+	* erc-nets.el (erc-networks-alist):
+	* erc-nets.el (erc-determine-network): New.
+	* erc-nets.el (erc-network): New.
+	* erc-nets.el (erc-current-network): New.
+	* erc-nets.el (erc-network-name): New.
+	* erc-nets.el (erc-set-network-name): New.
+	* erc-nets.el (erc-unset-network-name): New.
+	* erc-nets.el (erc-ports-list):
+	* erc-nets.el (erc-server-select):
+	* erc-nets.el (erc-settings):
+	* erc-nets.el (pals):
+	* erc-netsplit.el (erc-netsplit-version):
+	* erc-nickserv.el:
+	* erc-nickserv.el (erc-nets):
+	* erc-nickserv.el (erc-nickserv-version):
+	* erc-nickserv.el (erc-nickserv-alist):
+	* erc-nickserv.el (erc-nickserv-identify-autodetect):
+	* erc-nickserv.el (erc-nickserv-identify):
+	* erc-nickserv.el (erc-networks): Removed.
+	* erc-nickserv.el (erc-current-network): Removed.
+	* erc-notify.el (erc-nets):
+	* erc-page.el (erc-cmd-PAGE):
+	* erc-pcomplete.el:
+	* erc-pcomplete.el (time-date):
+	* erc-pcomplete.el (erc-pcomplete-version):
+	* erc-pcomplete.el (erc-pcomplete-order-nickname-completions): New.
+	* erc-pcomplete.el (pcomplete-erc-ops):
+	* erc-pcomplete.el (pcomplete-erc-not-ops):
+	* erc-pcomplete.el (pcomplete-erc-nicks):
+	* erc-pcomplete.el (pcomplete-erc-all-nicks):
+	* erc-pcomplete.el (erc-pcomplete-bring-channel-member-to-front): Removed.
+	* erc-pcomplete.el (erc-pcomplete-ordering-PRIVMSG-handler): Removed.
+	* erc-replace.el (erc-replace-version):
+	* erc-ring.el (erc-ring-version):
+	* erc-ring.el (erc-input-ring):
+	* erc-ring.el (erc-input-ring-index):
+	* erc-ring.el (erc-input-ring-setup):
+	* erc-ring.el (erc-replace-current-command):
+	* erc-speedbar.el (erc-speedbar-expand-channel):
+	* erc-speedbar.el (erc-speedbar-sort-channel-members): Removed.
+	* erc-speedbar.el (erc-speedbar-insert-user):
+	* erc-stamp.el:
+	* erc-stamp.el (erc-stamp-version):
+	* erc-stamp.el (erc-timestamp-intangible): New.
+	* erc-stamp.el (erc-timestamp-last-inserted): New.
+	* erc-stamp.el (erc-format-timestamp):
+	* erc-track.el:
+	* erc-track.el (erc-track-version):
+	* erc-track.el (erc-track-priority-faces-only): New.
+	* erc-track.el (Note): New.
+	* erc-track.el (erc-track-modified-channels):
+	* erc.el:
+	* erc.el (erc-version-string):
+	* erc.el (erc-manual-set-nick-on-bad-nick-p): New.
+	* erc.el (erc-send-whitespace-lines): New.
+	* erc.el (erc-disconnected-hook): New.
+	* erc.el (erc-complete-functions): New.
+	* erc.el (erc-quit-hook): New.
+	* erc.el (erc-part-hook): New.
+	* erc.el (erc-kick-hook): New.
+	* erc.el (erc-connect-pre-hook): New.
+	* erc.el (erc-process): New.
+	* erc.el (channel-members): Removed.
+	* erc.el (erc-channel-users): New.
+	* erc.el (erc-server-users): New.
+	* erc.el (erc-downcase): New.
+	* erc.el ((erc-server-user (:type vector) :named)):
+	* erc.el ((erc-server-user): New.
+	* erc.el ((erc-channel-user): New.
+	* erc.el (erc-get-channel-user): New.
+	* erc.el (erc-get-server-user): New.
+	* erc.el (erc-add-server-user): New.
+	* erc.el (erc-remove-server-user): New.
+	* erc.el (erc-change-user-nickname): New.
+	* erc.el (erc-remove-channel-user): New.
+	* erc.el (erc-remove-user): New.
+	* erc.el (erc-remove-channel-users): New.
+	* erc.el (erc-channel-user-op-p): New.
+	* erc.el (erc-channel-user-voice-p): New.
+	* erc.el (erc-get-channel-user-list): New.
+	* erc.el (erc-get-server-nickname-list): New.
+	* erc.el (erc-get-channel-nickname-list): New.
+	* erc.el (erc-get-server-nickname-alist): New.
+	* erc.el (erc-get-channel-nickname-alist): New.
+	* erc.el (erc-sort-channel-users-by-activity): New.
+	* erc.el (erc-input-line-position): New.
+	* erc.el (erc-ignore-list):
+	* erc.el (erc-mode):
+	* erc.el (erc-with-buffer):
+	* erc.el (erc-get-buffer):
+	* erc.el (erc-iswitchb):
+	* erc.el (erc-buffer-list-with-nick):
+	* erc.el (erc-default-recipients):
+	* erc.el (erc-network-name): Removed.
+	* erc.el (erc-session-user-full-name):
+	* erc.el (current-nick):
+	* erc.el (channel-user-limit):
+	* erc.el (last-peers):
+	* erc.el (invitation):
+	* erc.el (away):
+	* erc.el (channel-list):
+	* erc.el (last-sent-time):
+	* erc.el (last-ping-time):
+	* erc.el (last-ctcp-time):
+	* erc.el (erc-lines-sent):
+	* erc.el (erc-bytes-sent):
+	* erc.el (erc-announced-server-name): Removed.
+	* erc.el (quitting):
+	* erc.el (bad-nick):
+	* erc.el (erc-logged-in):
+	* erc.el (erc-default-nicks):
+	* erc.el (erc-nick-change-attempt-count): New.
+	* erc.el (erc-previous-read): New.
+	* erc.el (erc):
+	* erc.el (erc-split-multiline):
+	* erc.el (erc-process-sentinel):
+	* erc.el (erc-display-line-1):
+	* erc.el (erc-update-undo-list): New.
+	* erc.el (erc-is-valid-nick-p):
+	* erc.el (erc-scroll-to-bottom):
+	* erc.el (erc-add-scroll-to-bottom):
+	* erc.el (erc-send-input-line-function): New.
+	* erc.el (erc-send-input-line):
+	* erc.el ((fboundp 'help-function-arglist)):
+	* erc.el (erc-cmd-OPS):
+	* erc.el (erc-cmd-COUNTRY):
+	* erc.el (erc-script-args): New.
+	* erc.el (erc-cmd-WHOAMI): New.
+	* erc.el (erc-server-364-hook): New.
+	* erc.el (erc-server-365-hook): New.
+	* erc.el (erc-server-367-hook): New.
+	* erc.el (erc-server-368-hook): New.
+	* erc.el (channel-banlist): New.
+	* erc.el (erc-server-vectors): New.
+	* erc.el (erc-duplicates): New.
+	* erc.el (erc-query):
+	* erc.el (erc-nickname-in-use):
+	* erc.el (erc-server-KICK):
+	* erc.el (erc-server-NICK):
+	* erc.el (erc-server-PART):
+	* erc.el (erc-lag): New.
+	* erc.el (erc-setup-periodical-server-ping):
+	* erc.el (erc-format-nick):
+	* erc.el (erc-format-@nick):
+	* erc.el (erc-server-PRIVMSG-or-NOTICE):
+	* erc.el (erc-server-QUIT):
+	* erc.el (erc-server-version): New.
+	* erc.el (erc-server-001): New.
+	* erc.el (erc-server-311-or-314):
+	* erc.el (erc-server-317):
+	* erc.el (erc-server-315-hook): Removed.
+	* erc.el (erc-server-319):
+	* erc.el (erc-server-318-hook): Removed.
+	* erc.el (erc-server-352):
+	* erc.el (erc-banlist-store):
+	* erc.el (erc-server-369-hook): Removed.
+	* erc.el (erc-channel-end-receiving-names):
+	* erc.el (erc-channel-receive-names):
+	* erc.el (erc-update-user-nick): New.
+	* erc.el (erc-update-user): New.
+	* erc.el (erc-update-current-channel-member):
+	* erc.el (erc-update-channel-member):
+	* erc.el (erc-remove-current-channel-member):
+	* erc.el (erc-remove-channel-member):
+	* erc.el (erc-update-channel-topic):
+	* erc.el (erc-set-modes):
+	* erc.el (erc-get-current-channel-members): Removed.
+	* erc.el (erc-get-channel-members): Removed.
+	* erc.el (erc-update-modes):
+	* erc.el (erc-update-channel-limit):
+	* erc.el (erc-find-channel-info-buffer):
+	* erc.el (erc-update-channel-info-buffer):
+	* erc.el (erc-update-channel-info-buffers):
+	* erc.el (erc-remove-member-all-channels): Removed.
+	* erc.el (erc-update-member-all-channels): Removed.
+	* erc.el (erc-beg-of-input-line):
+	* erc.el (erc-end-of-input-line):
+	* erc.el (erc-send-current-line):
+	* erc.el (erc-ignored-reply-p):
+	* erc.el (erc-channel-member-to-user-spec): Removed.
+	* erc.el (erc-user-spec): New.
+	* erc.el (erc-nick-at-point):
+	* erc.el (erc-operator-p): Removed.
+	* erc.el (erc-mode-line-away-status-format): New.
+	* erc.el (erc-prepare-mode-line-format):
+	* erc.el (erc-update-mode-line-buffer):
+	* erc.el (erc-kill-buffer-function):
+
 2004-01-20  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 0.05 released.
 
 
 VERSION = 0.05
-AUTHOR_VERSION = Version 4.0 Revision: 1.608
+AUTHOR_VERSION = Version 4.0 Revision: 1.637
 MAINTAINER = Adrian Aichner <adrian@xemacs.org>
 PACKAGE = erc
 PKG_TYPE = regular
 erc-chess.el erc-bbdb.el erc-ibuffer.el erc-speak.el \
 erc-speedbar.el erc-compat.el
 
-DATA_FILES = AUTHORS CREDITS README servers.pl
+DATA_FILES = AUTHORS CREDITS HISTORY README servers.pl
 DATA_DEST = $(PACKAGE)
 
 include ../../XEmacs.rules

Makefile.upstream

 SPECIAL = erc-auto.el
 UNCOMPILED = erc-chess.el erc-bbdb.el erc-ibuffer.el erc-speak.el \
 		erc-speedbar.el erc-compat.el
+TESTING = erc-members.el erc-macs.el
 ALLSOURCE = $(wildcard *.el)
-SOURCE	= $(filter-out $(SPECIAL) $(UNCOMPILED),$(ALLSOURCE))
+SOURCE	= $(filter-out $(SPECIAL) $(UNCOMPILED) $(TESTING),$(ALLSOURCE))
 TARGET	= $(patsubst %.el,%.elc,$(SPECIAL) $(SOURCE))
 MISC	= AUTHORS CREDITS HISTORY README Makefile ChangeLog mkChangeLog \
 		servers.pl erc-auto.in
   "The Emacs idletimer.
 This is only used when `erc-autoaway-use-emacs-idle' is non-nil.")
 
+(defcustom erc-autoaway-use-emacs-idle nil
+  "*If non-nil, the idle time refers to idletime in Emacs.
+If nil, the idle time refers to idletime on IRC only.
+The time itself is specified by `erc-autoaway-idle-seconds'.
+See `erc-autoaway-mode' for more information on the various
+definitions of being idle.
+
+Note that using Emacs idletime is currently broken for most versions,
+since process activity (as happens all the time on IRC) makes Emacs
+non-idle.  Emacs idle-time and user idel-time are just not the same."
+  :group 'erc-autoaway
+  :type 'boolean)
+
 ;;;###autoload (autoload 'erc-autoaway-mode "erc-autoaway")
 (define-erc-module autoaway nil
   "In ERC autoaway mode, you can be set away automatically.
   :group 'erc-autoaway
   :type 'boolean)
 
-(defcustom erc-autoaway-use-emacs-idle nil
-  "*If non-nil, the idle time refers to idletime in Emacs.
-If nil, the idle time refers to idletime on IRC only.
-The time itself is specified by `erc-autoaway-idle-seconds'.
-See `erc-autoaway-mode' for more information on the various
-definitions of being idle.
-
-Note that using Emacs idletime is currently broken for most versions,
-since process activity (as happens all the time on IRC) makes Emacs
-non-idle.  Emacs idle-time and user idel-time are just not the same."
-  :group 'erc-autoaway
-  :type 'boolean)
-
 (defcustom erc-autoaway-idle-seconds 1800
   "*Number of seconds after which ERC will set you automatically away.
 If you are changing this variable using lisp instead of customizing it,
 (require 'erc)
 ;;; Minor Mode
 
-(defconst erc-autojoin-version "Revision: 1.6"
+(defconst erc-autojoin-version "$Revision$"
   "ERC autojoin revision.")
 
 (defgroup erc-autojoin nil
 (require 'bbdb-gui)
 (require 'bbdb-hooks)
 
-(defconst erc-bbdb-version "Revision: 1.21"
+(defconst erc-bbdb-version "$Revision$"
   "ERC BBDB revision.")
 
 (defgroup erc-bbdb nil
 
 ;;; Variables
 
-(defconst erc-button-version "Revision: 1.47"
+(defconst erc-button-version "$Revision$"
   "ERC button mode revision.")
 
 (defcustom erc-button-face 'bold
     ("<URL: *\\([^<> ]+\\) *>" 0 t browse-url 1)
     ("\\b\\(Ward\\|Wiki\\|WardsWiki\\|TheWiki\\):\\([A-Z][a-z]+\\([A-Z][a-z]+\\)+\\)"
      0 t (lambda (page)
-	   (browse-url (concat "http://c2.com/cgi-bin/wiki?" page)))
+           (browse-url (concat "http://c2.com/cgi-bin/wiki?" page)))
      2)
     ("EmacsWiki:\\([A-Z][a-z]+\\([A-Z][a-z]+\\)+\\)" 0 t erc-browse-emacswiki 1)
+    ("Lisp:\\([a-zA-Z.+-]+\\)" 0 t erc-browse-emacswiki-lisp 1)
     (erc-button-url-regexp 0 t browse-url 0)
-    (channel-members 0 (or (and (numberp erc-button-buttonize-nicks)
-				(> erc-button-buttonize-nicks
-				   (length channel-members)))
-			   erc-button-buttonize-nicks)
-		     erc-nick-popup 0)
+    ('nicknames 0 erc-button-buttonize-nicks erc-nick-popup 0)
     ("\\bGoogle:\\([^ \t\n\r\f]+\\)"
      0 t (lambda (keywords)
-	   (browse-url (format erc-button-google-url keywords)))
+           (browse-url (format erc-button-google-url keywords)))
      1)
     ("\\brfc[#: ]?\\([0-9]+\\)"
      0 t (lambda (num)
-	   (browse-url (format erc-button-rfc-url num)))
+           (browse-url (format erc-button-rfc-url num)))
      1)
     ("\\s-\\(@\\([0-9][0-9][0-9]\\)\\)"
      1 t (lambda (beats)
-	   (let* ((seconds (- (* (string-to-number beats) 86.4)
-			      3600
-			      (- (car (current-time-zone)))))
-		  (hours (mod (floor seconds 3600) 24))
-		  (minutes (mod (round seconds 60) 60)))
-	     (message (format "@%s is %d:%02d local time"
-			      beats hours minutes))))
+           (let* ((seconds (- (* (string-to-number beats) 86.4)
+                              3600
+                              (- (car (current-time-zone)))))
+                  (hours (mod (floor seconds 3600) 24))
+                  (minutes (mod (round seconds 60) 60)))
+             (message (format "@%s is %d:%02d local time"
+                              beats hours minutes))))
      2)
     ("[`]\\([a-zA-Z][-a-zA-Z_0-9]+\\)[']"
      1 t (lambda (symbol-name)
-	   (let ((symbol (intern-soft symbol-name)))
-	     (cond ((and symbol (fboundp symbol))
-		    (describe-function symbol))
-		   ((and symbol (boundp symbol))
-		    (describe-variable symbol))
-		   (t (apropos symbol-name)))))
+           (let ((symbol (intern-soft symbol-name)))
+             (cond ((and symbol (fboundp symbol))
+                    (describe-function symbol))
+                   ((and symbol (boundp symbol))
+                    (describe-variable symbol))
+                   (t (apropos symbol-name)))))
      1))
   "*Alist of regexps matching buttons in ERC buffers.
 Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where
+
 REGEXP is the string matching text around the button or a symbol
-  indicating a variable holding that string, or a list of strings, or an
-  alist with the strings in the car (such as `channel-members').
-  Note that entries in lists or alists are considered to be nicks or
-  other complete words.  Therefore they are enclosed in \\< and \\>
-  while searching.
+  indicating a variable holding that string, or a list of
+  strings, or an alist with the strings in the car.  Note that
+  entries in lists or alists are considered to be nicks or other
+  complete words.  Therefore they are enclosed in \\< and \\>
+  while searching.  REGEXP can also be the quoted symol
+  'nicknames, which matches the nickname of any user on the
+  current server.
+
 BUTTON is the number of the regexp grouping actually matching the
-  button,
+  button,  This is ignored if REGEXP is 'nickname.
+
 FORM is a lisp expression which must eval to true for the button to
   be added,
+
 CALLBACK is the function to call when the user push this button.
   CALLBACK can also be a symbol.  Its variable value will be used
   as the callback function.
+
 PAR is a number of a regexp grouping whose text will be passed to
-  CALLBACK.  There can be several PAR arguments."
+  CALLBACK.  There can be several PAR arguments.  If REGEXP is
+  'nickname, these are ignored, and CALLBACK will be called with
+  the nickname matched as the argument."
   :group 'erc-button
   :type '(repeat (list (choice regexp variable)
-		       (integer :tag "Button")
-		       (sexp :tag "Form")
-		       (function :tag "Callback")
-		       (repeat :tag "Par"
-			       :inline t
-			       (integer :tag "Regexp group")))))
+                       (integer :tag "Button")
+                       (sexp :tag "Form")
+                       (function :tag "Callback")
+                       (repeat :tag "Par"
+                               :inline t
+                               (integer :tag "Regexp group")))))
 
 (defcustom erc-emacswiki-url "http://www.emacswiki.org/cgi-bin/wiki.pl?"
   "*URL of the EmacsWiki Homepage."
   :group 'erc-button
   :type 'string)
 
+(defcustom erc-emacswiki-lisp-url "http://www.emacswiki.org/elisp/"
+  "*URL of the EmacsWiki ELisp area."
+  :group 'erc-button
+  :type 'string)
+
 (defvar erc-button-keymap
   (let ((map (make-sparse-keymap)))
     (define-key map (kbd "RET") 'erc-button-press-button)
     (if (featurep 'xemacs)
-	(define-key map (kbd "<button2>") 'erc-button-click-button)
+        (define-key map (kbd "<button2>") 'erc-button-click-button)
       (define-key map (kbd "<mouse-2>") 'erc-button-click-button))
     (define-key map (kbd "TAB") 'erc-button-next)
     (set-keymap-parent map erc-mode-map)
   (save-excursion
     (with-syntax-table erc-button-syntax-table
       (let ((buffer-read-only nil)
-	    (inhibit-point-motion-hooks t)
-	    (alist erc-button-alist)
-	    entry regexp data)
-	(erc-button-remove-old-buttons)
-	(dolist (entry alist)
-	  (setq regexp (or (and (stringp (car entry)) (car entry))
-			   (and (boundp (car entry))
-				(symbol-value (car entry)))))
-	  (cond ((stringp regexp)
-		 (erc-button-add-buttons-1 regexp entry))
-		((and (listp regexp) (stringp (car regexp)))
-		 (dolist (r regexp)
-		   (erc-button-add-buttons-1
-		    (concat "\\<" (regexp-quote r) "\\>")
-		    entry)))
-		((and (listp regexp) (listp (car regexp))
-		      (stringp (caar regexp)))
-		 (dolist (elem regexp)
-		   (erc-button-add-buttons-1
-		    (concat "\\<" (regexp-quote (car elem)) "\\>")
-		    entry)))))))))
+            (inhibit-point-motion-hooks t)
+            (inhibit-field-text-motion t)
+            (alist erc-button-alist)
+            entry regexp data)
+        (erc-button-remove-old-buttons)
+        (dolist (entry alist)
+          (if (equal (car entry) (quote (quote nicknames)))
+              (erc-button-add-nickname-buttons entry)
+            (progn
+              (setq regexp (or (and (stringp (car entry)) (car entry))
+                               (and (boundp (car entry))
+                                    (symbol-value (car entry)))))
+              (cond ((stringp regexp)
+                     (erc-button-add-buttons-1 regexp entry))
+                    ((and (listp regexp) (stringp (car regexp)))
+                     (dolist (r regexp)
+                       (erc-button-add-buttons-1
+                        (concat "\\<" (regexp-quote r) "\\>")
+                        entry)))
+                    ((and (listp regexp) (listp (car regexp))
+                          (stringp (caar regexp)))
+                     (dolist (elem regexp)
+                       (erc-button-add-buttons-1
+                        (concat "\\<" (regexp-quote (car elem)) "\\>")
+                        entry)))))))))))
+
+(defun erc-button-add-nickname-buttons (entry)
+  "Search through the buffer for nicknames, and add buttons."
+  (let ((form (nth 2 entry))
+        (fun (nth 3 entry))
+        bounds word)
+    (when (or (eq t form)
+              (eval form))
+      (goto-char (point-min))
+      (while (forward-word 1)
+        (setq bounds (bounds-of-thing-at-point 'word))
+        (setq word (buffer-substring-no-properties
+                    (car bounds) (cdr bounds)))
+        (if (erc-get-server-user word)
+            (erc-button-add-button (car bounds) (cdr bounds)
+                                   fun (list word)))))))
 
 (defun erc-button-add-buttons-1 (regexp entry)
   "Search through the buffer for matches to ENTRY and add buttons."
   (goto-char (point-min))
   (while (re-search-forward regexp nil t)
     (let ((start (match-beginning (nth 1 entry)))
-	  (end (match-end (nth 1 entry)))
-	  (form (nth 2 entry))
-	  (fun (nth 3 entry))
-	  (data (mapcar 'match-string (nthcdr 4 entry))))
+          (end (match-end (nth 1 entry)))
+          (form (nth 2 entry))
+          (fun (nth 3 entry))
+          (data (mapcar 'match-string (nthcdr 4 entry))))
       (when (or (eq t form)
-		(eval form))
-	(erc-button-add-button start end fun data regexp)))))
+                (eval form))
+        (erc-button-add-button start end fun data regexp)))))
 
 (defun erc-button-remove-old-buttons ()
   "Remove all existing buttons.
   (remove-text-properties
    (point-min) (point-max)
    '(erc-callback nil
-     erc-data nil
-     mouse-face nil
-     local-map nil)))
+                  erc-data nil
+                  mouse-face nil
+                  local-map nil)))
 
 (defun erc-button-add-button (from to fun &optional data regexp)
   "Create a button between FROM and TO with callback FUN and data DATA."
              (string= regexp erc-button-url-regexp)
              (> (- to from) (if (numberp erc-button-wrap-long-urls)
                                 erc-button-wrap-long-urls
-                                erc-fill-column)))
+                              erc-fill-column)))
     (let ((erc-fill-column (if (numberp erc-button-wrap-long-urls)
                                erc-button-wrap-long-urls
-                               erc-fill-column))
+                             erc-fill-column))
           pos)
       (setq to (prog1 (point-marker) (insert ">"))
             from   (prog2 (goto-char from) (point-marker) (insert "<URL: "))
   (add-text-properties
    from to
    (nconc (and erc-button-mouse-face
-	       (list 'mouse-face erc-button-mouse-face))
-	  (list 'erc-callback fun)
-	  (list 'local-map erc-button-keymap)
+               (list 'mouse-face erc-button-mouse-face))
+          (list 'erc-callback fun)
+          (list 'local-map erc-button-keymap)
           (list 'rear-nonsticky t)
-	  (and data (list 'erc-data data))))
+          (and data (list 'erc-data data))))
   (widget-convert-button 'link from to :action 'erc-widget-press-button))
 
 (defun erc-button-add-face (from to face)
   ;; very slow with lots of buttons.  This is why we manually merge
   ;; face text properties.
   (let ((old (erc-list (get-text-property from 'face)))
-	(pos from)
-	(end (next-single-property-change from 'face nil to))
-	new)
+        (pos from)
+        (end (next-single-property-change from 'face nil to))
+        new)
     ;; old is the face at pos, in list form.  It is nil if there is no
     ;; face at pos.  If nil, the new face is FACE.  If not nil, the
     ;; new face is a list containing FACE and the old stuff.  end is
       (setq new (if old (cons face old) face))
       (put-text-property pos end 'face new)
       (setq pos end
-	    old (erc-list (get-text-property pos 'face))
-	    end (next-single-property-change pos 'face nil to)))))
+            old (erc-list (get-text-property pos 'face))
+            end (next-single-property-change pos 'face nil to)))))
 
 (defun erc-button-click-button (event)
   "Call `erc-button-press-button'."
 call it with the value of the `erc-data' text property."
   (interactive)
   (let* ((data (get-text-property (point) 'erc-data))
-	 (fun (get-text-property (point) 'erc-callback)))
+         (fun (get-text-property (point) 'erc-callback)))
     (unless fun
       (message "No button at point"))
     (when (and fun (symbolp fun) (not (fboundp fun)))
   "Browse to thing in the emacs-wiki."
   (browse-url (concat erc-emacswiki-url thing)))
 
+(defun erc-browse-emacswiki-lisp (thing)
+  "Browse to THING in the emacs-wiki elisp area."
+  (browse-url (concat erc-emacswiki-lisp-url thing)))
+
 ;;; Nickname buttons:
 
 (defcustom erc-nick-popup-alist
   '(("DeOp"  . (erc-cmd-DEOP nick))
     ("Kick"  . (erc-cmd-KICK (concat nick " "
-				     (read-from-minibuffer
-				      (concat "Kick " nick ", reason: ")))))
+                                     (read-from-minibuffer
+                                      (concat "Kick " nick ", reason: ")))))
     ("Msg"   . (erc-cmd-MSG (concat nick " "
-				    (read-from-minibuffer
-				     (concat "Message to " nick ": ")))))
+                                    (read-from-minibuffer
+                                     (concat "Message to " nick ": ")))))
     ("Op"    . (erc-cmd-OP nick))
     ("Query" . (erc-cmd-QUERY nick))
     ("Whois" . (erc-cmd-WHOIS nick))
     nick)))"
   :group 'erc-button
   :type '(repeat (cons (string :tag "Op")
-		       sexp)))
+                       sexp)))
 
 (defun erc-nick-popup (nick)
   (let* ((completion-ignore-case t)
-	 (action (completing-read (concat "What action to take on '" nick "'? ")
-				  erc-nick-popup-alist))
-	 (code (cdr (assoc action erc-nick-popup-alist))))
+         (action (completing-read (concat "What action to take on '" nick "'? ")
+                                  erc-nick-popup-alist))
+         (code (cdr (assoc action erc-nick-popup-alist))))
     (when code
       (setq erc-active-buffer (current-buffer))
       (eval code))))
 
 ;;;; Variables
 
-(defconst erc-chess-version "Revision: 1.21"
+(defconst erc-chess-version "$Revision$"
   "ERC chess revision.")
 
 (defgroup erc-chess nil
 
 (defvar erc-chess-regexp-alist chess-network-regexp-alist)
 (defvar erc-chess-partner)
+(make-variable-buffer-local 'erc-chess-partner)
 
 ;;;; Catalog messages
 
 This is the main handler for the erc-chess module."
   (cond
    ((eq event 'initialize)
-    (set (make-local-variable 'erc-chess-partner) (car args))
-    (set (make-local-variable 'erc-process) (nth 1 args))
+    (setq erc-chess-partner (car args))
+    (setq erc-process (nth 1 args))
     t)
 
    ((eq event 'send)
 
 ;;; Code:
 
-(defconst erc-compat-version "Revision: 1.15"
+(defconst erc-compat-version "$Revision$"
   "ERC compat revision.")
 
 ;; erc-define-minor-mode: the easy-mmode-define-minor-mode available
 (require 'erc-match); for erc-pals
 (require 'hippie-exp); for the hippie expand stuff
 
-(defconst erc-complete-version "Revision: 1.13"
+(defconst erc-complete-version "$Revision$"
   "ERC complete revision.")
 
 ;;;###autoload
 
 (require 'erc)
 
-(defconst erc-dcc-version "Revision: 1.1.1.1"
+(defconst erc-dcc-version "$Revision$"
   "ERC DCC revision")
 
 (defgroup erc-dcc nil
 (defun pcomplete/erc-mode/DCC ()
   "Provides completion for the /DCC command."
   (pcomplete-here (append '("chat" "close" "get" "list")
-			  (when (fboundp 'make-network-process) "send")))
+			  (when (fboundp 'make-network-process) '("send"))))
   (pcomplete-here
    (case (intern (downcase (pcomplete-arg 1)))
      (chat (mapcar (lambda (elt) (plist-get elt :nick))
        'dcc-malformed ?n nick ?u login ?h host ?q query)))))
 
 
-(make-variable-buffer-local
- (defvar erc-dcc-entry-data nil
-   "Holds the `erc-dcc-list' entry for this DCC connection."))
+(defvar erc-dcc-entry-data nil
+  "Holds the `erc-dcc-list' entry for this DCC connection.")
+(make-variable-buffer-local 'erc-dcc-entry-data)
 
 ;;; SEND handling
 
 
 ;;; GET handling
 
+(defvar erc-dcc-byte-count nil)
+(make-variable-buffer-local 'erc-dcc-byte-count)
+
 (defun erc-dcc-get-file (entry file parent-proc)
   "This function does the work of setting up a transfer from the remote client
 to the local one over a tcp connection. This involves setting up a process
 
       (setq erc-process parent-proc
 	    erc-dcc-entry-data entry)
-      (set (make-local-variable 'erc-dcc-byte-count) 0)
+      (setq erc-dcc-byte-count 0)
       (setq proc
 	    (funcall erc-dcc-connect-function
 		     "dcc-get" buffer
 	     nick
 	     (erc-ip-to-decimal (nth 0 contact)) (nth 1 contact)))))
 
+(defvar erc-dcc-from)
+(make-variable-buffer-local 'erc-dcc-from)
+
+(defvar erc-dcc-unprocessed-output)
+(make-variable-buffer-local 'erc-dcc-unprocessed-output)
+
 (defun erc-dcc-chat-setup (entry)
   "Setup a DCC chat buffer, returning the buffer."
   (let* ((nick (erc-extract-nick (plist-get entry :nick)))
     ;; buffer is now the current buffer.
     (erc-dcc-chat-mode)
     (setq erc-process parent-proc)
-    (make-local-variable 'erc-dcc-from)
     (setq erc-dcc-from nick)
     (setq erc-dcc-entry-data entry)
-    (make-local-variable 'erc-dcc-unprocessed-output)
     (setq erc-dcc-unprocessed-output "")
     (setq erc-insert-marker (set-marker (make-marker) (point-max)))
     (erc-display-prompt buffer (point-max))
 
 (require 'erc)
 
-(defconst erc-ezb-version "Revision: 1.4"
+(defconst erc-ezb-version "$Revision$"
   "ERC EZBouncer revision.")
 
 (defcustom erc-ezb-regexp "^ezbounce!srv$"
 
 (defvar erc-ezb-session-list '()
   "List of detached EZBounce sessions.")
+(make-variable-buffer-local 'erc-ezb-session-list)
 
 (defvar erc-ezb-inside-session-listing nil
   "Indicate whether current notices are expected to be EZB session listings.")
 
-(make-variable-buffer-local 'erc-ezb-session-list)
-
 ;;;###autoload
 (defun erc-cmd-ezb (line &optional force)
   "Send EZB commands to the EZBouncer verbatim."
 (require 'erc)
 (require 'erc-stamp); for the timestamp stuff
 
-(defconst erc-fill-version "Revision: 1.23"
+(defconst erc-fill-version "$Revision$"
   "ERC fill revision.")
 
 (defgroup erc-fill nil
 
 (require 'ibuffer)
 
-(defconst erc-ibuffer-version "Revision: 1.17"
+(defconst erc-ibuffer-version "$Revision$"
   "ERC ibuffer revision.")
 
 (defgroup erc-ibuffer nil
 	 (string-match qualifier erc-announced-server-name))))
 
 (ibuffer-define-column erc-modified (:name "M")
-  (if (and (boundp 'erc-track-modified-channels-mode)
-	   erc-track-modified-channels-mode)
+  (if (and (boundp 'erc-track-mode)
+	   erc-track-mode)
       (let ((entry (assq (current-buffer) erc-modified-channels-alist)))
 	(if entry
 	    (if (> (length entry) 1)
       (erc-interpret-controls channel-topic)
     ""))
 
-(ibuffer-define-column erc-members (:name "Users")
+(ibuffer-define-column
+ erc-members (:name "Users")
   (if (and (eq major-mode 'erc-mode)
-	   (boundp 'channel-members)
-	   (> (length channel-members) 0))
-      (number-to-string (length channel-members))
+          (boundp 'erc-channel-users)
+          (hash-table-p erc-channel-users)
+          (> (hash-table-size erc-channel-users) 0))
+     (number-to-string (hash-table-size erc-channel-users))
     ""))
 
 (ibuffer-define-column erc-away (:name "A")
       "A"
     " "))
 
-(ibuffer-define-column erc-op (:name "O")
+(ibuffer-define-column
+ erc-op (:name "O")
   (if (and (eq major-mode 'erc-mode)
-	   (boundp 'channel-members)
-	   (nth 1 (assoc (erc-current-nick) channel-members)))
+          (erc-channel-user-op-p (erc-current-nick)))
       "@"
     " "))
 
 (ibuffer-define-column erc-voice (:name "V")
   (if (and (eq major-mode 'erc-mode)
-	   (boundp 'channel-members)
-	   (nth 2 (assoc (erc-current-nick) channel-members)))
+           (erc-channel-user-voice-p (erc-current-nick)))
       "+"
     " "))
 
 (require 'erc)
 (require 'imenu)
 
-(defconst erc-imenu-version "Revision: 1.5"
+(defconst erc-imenu-version "$Revision$"
   "ERC imenu revision.")
 
 (defun erc-unfill-notice ()
 
 ;;; Code:
 
+(require 'erc)
+
 (defvar iso-638-languages
   '(("aa" . "Afar")
     ("ab" . "Abkhazian")
 ;;; Code:
 
 (require 'erc)
+(require 'erc-nets)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; User customizable variables.
   :group 'erc
   :type 'boolean)
 
-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Faces.  There's really no good default value that we can set for the
 ;; foreground color of these faces, since we don't know the user's color scheme.
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (make-face 'erc-chanlist-header-face)
-(setq erc-chanlist-header-face 'erc-chanlist-header-face)
+(defvar erc-chanlist-header-face 'erc-chanlist-header-face)
 (set-face-foreground 'erc-chanlist-header-face nil)
 (set-face-background 'erc-chanlist-header-face nil)
 
 (make-face 'erc-chanlist-odd-line-face)
-(setq erc-chanlist-odd-line-face 'erc-chanlist-odd-line-face)
+(defvar erc-chanlist-odd-line-face 'erc-chanlist-odd-line-face)
 (set-face-foreground 'erc-chanlist-odd-line-face nil)
 (set-face-background 'erc-chanlist-odd-line-face nil)
 
 (make-face 'erc-chanlist-even-line-face)
-(setq erc-chanlist-even-line-face 'erc-chanlist-even-line-face)
+(defvar erc-chanlist-even-line-face 'erc-chanlist-even-line-face)
 (set-face-foreground 'erc-chanlist-even-line-face nil)
 (set-face-background 'erc-chanlist-even-line-face nil)
 
 
 (defvar erc-chanlist-sort-state 'channel
   "The sort mode of the channel list buffer.  Either 'channel or 'users.")
-
+(make-variable-buffer-local 'erc-chanlist-sort-state)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Define erc-chanlist-mode.
   (local-set-key "q" 'erc-chanlist-quit)
   (local-set-key "s" 'erc-chanlist-toggle-sort-state)
   (local-set-key "t" 'toggle-truncate-lines)
-  (set (make-local-variable 'erc-chanlist-sort-state) 'channel)
+  (setq erc-chanlist-sort-state 'channel)
   (setq truncate-lines t)
   (add-hook 'post-command-hook 'erc-chanlist-post-command-hook 'append 'local)
   (run-hooks 'erc-chanlist-mode-hook))
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 ;;;###autoload
-(defun erc-cmd-LIST (&optional channels)
-  "Displays a buffer containing a list of channels on the current server."
+(defun erc-cmd-LIST (&optional channel)
+  "Displays a buffer containing a list of channels on the current server.
+Optional argument CHANNEL specifies a single channel to list (instead of every
+available channel)."
   (interactive)
-  (if (and (null channels)
+  (if (and (null channel)
 	   (member-ignore-case (erc-network-name) erc-no-list-networks))
       (erc-display-line "ERC is configured not to allow the /LIST command on this network!"
 			(current-buffer))
-    (erc-display-line (erc-make-notice "Listing channels.  This may take a while."))
-    (erc-chanlist channels))
+    (erc-display-line (erc-make-notice (concat "Listing channel"
+					       (if channel
+						   "."
+						 "s.  This may take a while."))))
+    (erc-chanlist channel))
   t)
 
 ;;;###autoload
 	(message "Collecting channel list for server %s" erc-session-server))
     (erc-send-command (if (null channels)
 			  "LIST"
-			(concat "LIST " channels)))))
+			(concat "LIST "
+                                (mapconcat #'identity channels ","))))))
 
 (defun erc-chanlist-322 (proc parsed)
   "Processes an IRC 322 message, which carries information about one channel for
 			    file t 'nomessage)
             (if (and erc-truncate-buffer-on-save (interactive-p))
                 (progn
-                  (erase-buffer)
+                  (let ((inhibit-read-only t)) (erase-buffer))
                   (move-marker erc-last-saved-position (point-max))
                   (erc-display-prompt))
 		(move-marker erc-last-saved-position
   #'(lambda (x y) (string-equal (erc-downcase x) (erc-downcase y)))
   #'(lambda  (x)  (sxhash (erc-downcase x))))
 
-(make-variable-buffer-local
- (defvar erc-victims (make-hash-table :test 'nickeq)
-   "Hash-table of all known nick names on this server."))
+(defvar erc-victims (make-hash-table :test 'nickeq)
+  "Hash-table of all known nick names on this server.")
+(make-variable-buffer-local 'erc-victims)
 
-(make-variable-buffer-local
- (defvar erc-channel-victims (make-hash-table :test 'nickeq)
-   "Hash-table of all known nick names on this channel.
-Values are (OP VOICE) where OP and VOICE are boolean flags."))
+(defvar erc-channel-victims (make-hash-table :test 'nickeq)
+  "Hash-table of all known nick names on this channel.
+Values are (OP VOICE) where OP and VOICE are boolean flags.")
+(make-variable-buffer-local 'erc-channel-victims)
 
 (defmacro erc-victim (nick)
   "Access NICK.
 
 ;; Customisation:
 
-(defconst erc-match-version "Revision: 1.22"
+(defconst erc-match-version "$Revision$"
   "ERC match mode revision.")
 
 (defgroup erc-match nil
   :type '(repeat regexp))
 
 (defcustom erc-current-nick-highlight-type nil
-  "*Determines how to highlight your current nickname.
+  "*Determines how to highlight text in which your current nickname appears
+(does not apply to text sent by you).
 
 The following values are allowed:
 
-    nil   - do not highlight the message at all
-    'nick - highlight the current nickname only
-    'all  - highlight the entire message where current nickname occurs
+ nil              - do not highlight the message at all
+ 'keyword         - highlight all instances of current nickname in message
+ 'nick            - highlight the nick of the user who typed your nickname
+ 'nick-or-keyword - highlight the nick of the user who typed your nickname,
+                    or all instances of the current nickname if there was
+                    no sending user
+ 'all             - highlight the entire message where current nickname occurs
 
 Any other value disables highlighting of current nickname altogether."
   :group 'erc-match
 		prompt
 		completions
 		(lambda (x)
-		  (not (member (car x) (eval list)))))))
-    (if (member entry (eval list))
+		  (not (erc-member-ignore-case (car x) (symbol-value list)))))))
+    (if (erc-member-ignore-case entry (symbol-value list))
 	(error (format "\"%s\" is already on the list" entry))
       (set list (cons entry (symbol-value list))))))
 
 		 alist
 		 nil
 		 t)))
-    (if (member entry (symbol-value list))
+    (if (erc-member-ignore-case entry (symbol-value list))
 	;; plain string
 	(set list (delete entry (symbol-value list)))
       ;; cons cell
 (defun erc-add-pal ()
   "Add pal interactively to `erc-pals'."
   (interactive)
-  (erc-add-entry-to-list 'erc-pals "Add pal: " channel-members))
+  (erc-add-entry-to-list 'erc-pals "Add pal: " (erc-get-server-nickname-alist)))
 
 ;;;###autoload
 (defun erc-delete-pal ()
 (defun erc-add-fool ()
   "Add fool interactively to `erc-fools'."
   (interactive)
-  (erc-add-entry-to-list 'erc-fools "Add fool: " channel-members))
+  (erc-add-entry-to-list 'erc-fools "Add fool: " (erc-get-server-nickname-alist)))
 
 ;;;###autoload
 (defun erc-delete-fool ()
 In order to do this, every entry in `erc-fools' will be used.
 In any of the following situations, MSG is directed at an entry FOOL:
 
-- MSG starts with \"FOOL: \"
+- MSG starts with \"FOOL: \" or \"FOO, \"
 - MSG contains \", FOOL.\" (actually, \"\\s. FOOL\\s.\")"
   (let ((fools-beg (mapcar (lambda (entry)
-				 (concat "^" entry ": "))
+				 (concat "^" entry "[:,] "))
 			   erc-fools))
 	(fools-end (mapcar (lambda (entry)
 				 (concat "\\s. " entry "\\s."))
 		(match-face (intern (concat match-prefix "-face"))))
 	   (when (funcall match-pred nickuserhost message)
 	     (cond
+              ;; Highlight the nick of the message
 	      ((and (eq match-htype 'nick)
-		    nick-end)
+                    nick-end)
 	       (erc-put-text-property
 		nick-beg nick-end
 		'face match-face (current-buffer)))
+              ;; Highlight the nick of the message, or the current
+              ;; nick if there's no nick in the message (e.g. /NAMES
+              ;; output)
+              ((and (string= match-type "current-nick")
+                    (eq match-htype 'nick-or-keyword))
+               (if nick-end 
+                   (erc-put-text-property
+                    nick-beg nick-end
+                    'face match-face (current-buffer))
+                 (goto-char (+ 2 (or nick-end
+                                     (point-min))))
+                 (while (re-search-forward match-regex nil t)
+                   (erc-put-text-property (match-beginning 0) (match-end 0)
+                                          'face match-face))))
+              ;; Highlight the whole message
 	      ((eq match-htype 'all)
 	       (erc-put-text-property
 		(point-min) (point-max)
 		'face match-face (current-buffer)))
+              ;; Highlight all occurances of the word to be
+              ;; highlighted.
 	      ((and (string= match-type "keyword")
-		    (eq match-htype 'keyword))
+                    (eq match-htype 'keyword))
 	       (mapc (lambda (elt)
 		       (let ((regex elt)
 			     (face match-face))
 			    (match-beginning 0) (match-end 0)
 			    'face face))))
 		     match-regex))
+              ;; Highlight all occurances of our nick.
 	      ((and (string= match-type "current-nick")
-		    (eq match-htype 'nick))
+		    (eq match-htype 'keyword))
 	       (goto-char (+ 2 (or nick-end
 				   (point-min))))
 	       (while (re-search-forward match-regex nil t)
 		 (erc-put-text-property (match-beginning 0) (match-end 0)
 					'face match-face)))
+              ;; Else twiddle your thumbs.
 	      (t nil))
 	     (run-hook-with-args
 	      'erc-text-matched-hook
 	["Disconnect from server..." erc-quit-server erc-connected]
 	"-"
 	["Join channel..." erc-join-channel t]
-	["Leave this channel..." erc-part-from-channel channel-members]
-	["List users in channel" erc-channel-names channel-members]
+        ["Leave this channel..." erc-part-from-channel erc-channel-users]
+        ["List users in channel" erc-channel-names erc-channel-users]
 	["Set topic..." erc-set-topic
-   (and channel-members
         (or (not (member "t" channel-modes))
-            (nth 1 (assoc (erc-current-nick) channel-members))))]
+             (erc-channel-user-op-p (erc-current-nick)))]
   (list "Channel modes"
         ["Change mode..." erc-insert-mode-command
-         (and channel-members (nth 1 (assoc (erc-current-nick) channel-members)))]
+               (erc-channel-user-op-p (erc-current-nicK))]
         ["No external send" (erc-toggle-channel-mode "n")
-         :active (and channel-members
-                      (nth 1 (assoc (erc-current-nick) channel-members)))
+               :active (erc-channel-user-op-p (erc-current-nick))
          :style toggle :selected (member "n" channel-modes)]
         ["Topic set by channel op" (erc-toggle-channel-mode "t")
          :style toggle :selected (member "t" channel-modes)
-         :active (and channel-members
-                      (nth 1 (assoc (erc-current-nick) channel-members)))]
+               :active (erc-channel-user-op-p (erc-current-nick))]
         ["Invite only" (erc-toggle-channel-mode "i")
          :style toggle :selected (member "i" channel-modes)
-         :active (and channel-members
-                      (nth 1 (assoc (erc-current-nick) channel-members)))]
+               :active (erc-channel-user-op-p (erc-current-nick))]
         ["Private" (erc-toggle-channel-mode "p")
          :style toggle :selected (member "p" channel-modes)
-         :active (and channel-members
-                      (nth 1 (assoc (erc-current-nick) channel-members)))]
+               :active (erc-channel-user-op-p (erc-current-nick))]
         ["Secret" (erc-toggle-channel-mode "s")
          :style toggle :selected (member "s" channel-modes)
-         :active (and channel-members
-                      (nth 1 (assoc (erc-current-nick) channel-members)))]
+               :active (erc-channel-user-op-p (erc-current-nick))]
         ["Moderated" (erc-toggle-channel-mode "m")
          :style toggle :selected (member "m" channel-modes)
-         :active (and channel-members
-                      (nth 1 (assoc (erc-current-nick) channel-members)))]
+               :active (erc-channel-user-op-p (erc-current-nick))]
         ["Set a limit..." erc-set-channel-limit
-         (and channel-members (nth 1 (assoc (erc-current-nick) channel-members)))]
+               (erc-channel-user-op-p (erc-current-nick))]
         ["Set a key..." erc-set-channel-key
-         (and channel-members (nth 1 (assoc (erc-current-nick) channel-members)))])
+               (erc-channel-user-op-p (erc-current-nick))])
 	"-"
   (list "Pals, fools and other keywords"
         ["Add pal..." erc-add-pal]
 	      ["Identify to NickServ..." erc-nickserv-identify
          (functionp 'erc-nickserv-identify)])
 	"-"
-	["Track hidden channel buffers" erc-track-modified-channels-mode
-	 :style toggle :selected (and (boundp 'erc-track-modified-channels-mode)
-                                erc-track-modified-channels-mode)
-   :active (boundp 'erc-track-modified-channels-mode)]
+	["Track hidden channel buffers" erc-track-mode
+	 :style toggle :selected (and (boundp 'erc-track-mode)
+				      erc-track-mode)
+	 :active (boundp 'erc-track-mode)]
 	"-"
 	["Customize ERC" (customize-group 'erc) t]
 	"-"
+;;; erc-nets.el --- IRC networks
+
+;;; Commentary:
+
+;; This file deals with IRC networks.
+;;
+;; Usage:
+;;
+;; Put into your .emacs:
+;;
+;; (require 'erc-nets)
+;;
+;; M-x erc-server-select provides an alternative way to connect to servers by
+;; choosing networks.
+;; You can use (eq (erc-network) 'Network) if you'd like to set variables or do
+;; certain actions according to which network you're connected to.
+;; If a network you use is not listed in `erc-networks-alist', you can put
+;; (add-to-list 'erc-networks-alist '(Network "irc.server-name.net")) in your
+;; config file.
+
+;;; Code:
+
 (require 'erc)
 
+(defconst erc-nets-version "$Revision$"
+  "ERC networks revision.")
+
+;; Variables
+
 (defcustom erc-server-alist
 '(("4-irc: Random server" 4-irc "4-irc.com" 6667)
   ("A5KNet: Random server" A5KNet "irc.a5knet.com" ((6660 6669)))
   ("Blitzed: Random server" Blitzed "irc.blitzed.org" (6667 7000 ))
   ("Brasirc: Random server" Brasirc "irc.brasirc.net" ((6666 6667)))
   ("Brasirc: BR, PA, Belem" Brasirc "irc.libnet.com.br" ((6666 6668) 7777 8002 ))
-  ("Brasnet: Random European server" Brasnet "eu.brasnet.org" ((6665 6669)))
-  ("Brasnet: Random US server" Brasnet "us.brasnet.org" ((6665 6669)))
+  ("BRASnet: Random European server" BRASnet "eu.brasnet.org" ((6665 6669)))
+  ("BRASnet: Random US server" BRASnet "us.brasnet.org" ((6665 6669)))
   ("BubbleNet: Random server" BubbleNet "irc.bubblenet.org" ((6667 6669)))
   ("CCnet: Random server" CCnet "irc.cchat.net" (6667 7000 ))
   ("CCnet: US, TX, Dallas" CCnet "irc2.cchat.net" (6667 7000 ))
   ("Fraggers: Random server" Fraggers "irc.fraggers.co.uk" ((6661 6669) (7000 7001) ))
   ("FreedomChat: Random server" FreedomChat "chat.freedomchat.net" 6667)
   ("FreedomIRC: Random server" FreedomIRC "irc.freedomirc.net" 6667)
-  ("Freenode: Random server" Freenode "irc.freenode.net" 6667)
-  ("Freenode: Random EU server" Freenode "irc.eu.freenode.net" 6667)
-  ("Freenode: Random US server" Freenode "irc.us.freenode.net" 6667)
+  ("Freenode: Random server" freenode "irc.freenode.net" 6667)
+  ("Freenode: Random EU server" freenode "irc.eu.freenode.net" 6667)
+  ("Freenode: Random US server" freenode "irc.us.freenode.net" 6667)
   ("FunNet: Random server" FunNet "irc.funnet.org" 6667)
   ("Galaxynet: Random server" GalaxyNet "irc.galaxynet.org" ((6662 6668) 7000 ))
   ("Galaxynet: AU, NZ, Auckland" GalaxyNet "auckland.nz.galaxynet.org" ((6661 6669)))
   :type 'sexp)
 
 (defcustom erc-networks-alist
-'((4-irc nil)
-  (A5KNet nil)
-  (AbleNet nil)
-  (Accessirc nil)
-  (Acestar nil)
-  (Action-IRC nil)
-  (AfterNET nil)
-  (Alternativenet nil)
-  (AmigaNet nil)
-  (AngelEyez nil)
-  (Anothernet nil)
-  (ArabChat nil)
-  (AsiaTalk nil)
-  (AstroLink nil)
-  (Asylumnet nil)
-  (Austnet nil)
-  (AwesomeChat nil)
-  (Awesomechristians nil)
-  (Axenet nil)
-  (BGIRC nil)
-  (Beyondirc nil)
-  (Blabbernet nil)
-  (Blitzed nil)
-  (Brasirc nil)
-  (Brasnet nil)
-  (BubbleNet nil)
-  (CCnet nil)
-  (CNN nil)
-  (Chat-Net nil)
-  (Chat-Solutions nil)
-  (ChatCircuit nil)
-  (ChatNut nil)
-  (ChatPR nil)
-  (ChatX nil)
-  (Chatcafe nil)
-  (Chatchannel nil)
-  (Chatlink nil)
-  (Chatnet nil)
-  (Chatpinoy nil)
-  (Chatroom nil)
-  (Chatster nil)
-  (China263 nil)
-  (Cineplex1 nil)
-  (CobraNet nil)
-  (Coolchat nil)
-  (Criten nil)
-  (CyGanet nil)
-  (Cyberchat nil)
-  (DALnet nil)
-  (DWChat nil)
-  (Dark-Tou-Net nil)
-  (DarkMyst nil)
-  (Darkfire nil)
-  (Darkserv nil)
-  (Darksystem nil)
-  (Darktree nil)
-  (DayNet nil)
-  (Deepspace nil)
-  (Different nil)
-  (Digarix nil)
-  (Digatech nil)
-  (Digital-Base nil)
-  (Digitalirc nil)
-  (Discussioni nil)
-  (DorukNet nil)
-  (Dreamcast nil)
-  (Dynastynet nil)
-  (EFnet nil)
-  (EgyptianIRC nil)
-  (Eircnet nil)
-  (Eleethal nil)
-  (EntertheGame nil)
-  (EpiKnet nil)
-  (EsperNet nil)
-  (Esprit nil)
-  (Evilzinc nil)
-  (ExodusIRC nil)
-  (FDFnet nil)
-  (FEFnet nil)
-  (Financialchat nil)
-  (Forestnet nil)
-  (ForeverChat nil)
-  (Fraggers nil)
-  (FreedomChat nil)
-  (FreedomIRC nil)
-  (Freenode
-   "freenode.net$")
-  (FunNet nil)
-  (GIKInet nil)
-  (GRnet nil)
-  (GalaxyNet nil)
-  (Gamesnet nil)
-  (GammaForce nil)
-  (GizNet nil)
-  (GlobIRC nil)
-  (Globalchat nil)
-  (Goldchat nil)
-  (Goodchatting nil)
-  (GravityLords nil)
-  (GulfChat nil)
-  (HabberNet nil)
-  (HanIRC nil)
-  (Hellenicnet nil)
-  (ICQnet nil)
-  (IRC-Chile nil)
-  (IRC-Hispano nil)
-  (IRCGate nil)
-  (IRCGeeks nil)
-  (IRCSoulZ nil)
-  (IRCSul nil)
-  (IRCchat nil)
-  (IRChat nil)
-  (IRCnet nil)
-  (IRCtown nil)
-  (IRCworld nil)
-  (IceNet nil)
-  (Infatech nil)
-  (Infinity nil)
-  (Infomatrix nil)
-  (Inside3D nil)
-  (InterlinkChat nil)
-  (IrcLordz nil)
-  (IrcMalta nil)
-  (IrcTalk nil)
-  (Irctoo nil)
-  (Israelnet nil)
-  (K0wNet nil)
-  (KDFSnet nil)
-  (Kemik nil)
-  (Kewl.Org nil)
-  (Kickchat nil)
-  (KidsWorld nil)
-  (Knightnet nil)
-  (Konfido.Net nil)
-  (Kreynet nil)
-  (Krono nil)
-  (Krushnet nil)
-  (LagNet nil)
-  (Librenet nil)
-  (LinkNet nil)
-  (Liquidized nil)
-  (M-IRC nil)
-  (MagicStar nil)
-  (Mavra nil)
-  (MediaDriven nil)
-  (Morat nil)
-  (MusicCity nil)
-  (Mysteria nil)
-  (Mysterychat nil)
-  (Mystical nil)
-  (Narancs nil)
-  (Net-France nil)
-  (Nevernet nil)
-  (Newnet nil)
-  (Nexusirc nil)
-  (NightStar nil)
-  (NitrousNet nil)
-  (Novernet nil)
-  (Nullrouted nil)
-  (NullusNet nil)
-  (OpChat nil)
-  (OtherSide nil)
-  (Othernet nil)
-  (Outsiderz nil)
-  (OzOrg nil)
-  (POLNet nil)
-  (PTirc nil)
-  (PTlink nil)
-  (PTnet nil)
-  (Peacefulhaven nil)
-  (PhazedIRC nil)
-  (Philchat nil)
-  (PiNet nil)
-  (Pinoycentral nil)
-  (Planetarion nil)
-  (Psionics nil)
-  (QChat nil)
-  (QuakeNet nil)
-  (Realirc nil)
-  (RealmNET nil)
-  (Rebelchat nil)
-  (Red-Latina nil)
-  (RedLatona nil)
-  (Relicnet nil)
-  (Rezosup nil)
-  (Risanet nil)
-  (Rubiks nil)
-  (Rusnet nil)
-  (Sandnet nil)
-  (Scunc nil)
-  (SerbianCafe nil)
-  (SexNet nil)
-  (ShadowFire nil)
-  (ShadowWorld nil)
-  (SkyNet nil)
-  (Slashnet nil)
-  (SolarStone nil)
-  (Sorcery nil)
-  (SourceIRC nil)
-  (SpaceTronix nil)
-  (Spirit-Harmony nil)
-  (StarChat nil)
-  (StarEquinox nil)
-  (StarWars-IRC nil)
-  (Starlink nil)
-  (Stormdancing nil)
-  (Superchat nil)
-  (Sysopnet nil)
-  (TR-net nil)
-  (Telstra nil)
-  (Tri-net nil)
-  (TriLink nil)
-  (TurkishChat nil)
-  (UICN nil)
-  (UberNinja nil)
-  (UltraIRC nil)
-  (UnderChat nil)
-  (UnderZ nil)
-  (Undernet nil)
-  (UniChat nil)
-  (UnionLatina nil)
-  (Univers nil)
-  (UnixR nil)
-  (Vidgamechat nil)
-  (VirtuaNet nil)
-  (Vitamina nil)
-  (Voila nil)
-  (Wahou nil)
-  (Warpednet nil)
-  (Weaklinks nil)
-  (Webnet nil)
-  (WinChat nil)
-  (WinIRC nil)
-  (WorldIRC nil)
-  (WyldRyde nil)
-  (XNet nil)
-  (XWorld nil)
-  (XentoniX nil)
-  (Xevion nil)
-  (ZAnetNet nil)
-  (ZAnetOrg nil)
-  (ZUHnet nil)
-  (ZiRC nil)
-  (Zurna nil)
-  (euIRC nil)
-  (ircXtreme nil)
-  (mIRC-X nil)
-  (phrozN nil)
-  (starlink-irc nil))
+  '((4-irc "4-irc.com")
+    (A5KNet "a5knet.com")
+    (AbleNet "ablenet.org")
+    (Accessirc "accessirc.net")
+    (Acestar "acestar.org")
+    (Action-IRC "action-irc.net")
+    (AfterNET "afternet.org")
+    (Alternativenet "altnet.org")
+    (AmigaNet "amiganet.org")
+    (AngelEyez "angeleyez.net")
+    (Anothernet "another.net")
+    (ArabChat "arabchat.org")
+    (AsiaTalk "asiatalk.org")
+    (AstroLink "astrolink.org")
+    (Asylumnet "asylumnet.org")
+    (Austnet "austnet.org")
+    (AwesomeChat "awesomechat.net")
+    (Awesomechristians "awesomechristians.com")
+    (Axenet "axenet.org")
+    (Beyondirc "beyondirc.net")
+    (BGIRC "bulgaria.org")
+    (Blabbernet "blabber.net")
+    (Blitzed "blitzed.org")
+    (BrasIRC "brasirc.net")
+    (BRASnet "brasnet.org")
+    (BubbleNet "bubblenet.org")
+    (CCnet "christian-chat.net")
+    (Chat-Net "chat-net.org")
+    (Chat-Solutions "chat-solutions.org")
+    (Chatcafe "chatcafe.net")
+    (Chatchannel "chatchannel.org")
+    (ChatCircuit "chatcircuit.com")
+    (Chatlink "chatlink.org")
+    (Chatnet "chatnet.org")
+    (ChatNut "chatnut.net")
+    (Chatpinoy "chatpinoy.com")
+    (ChatPR "chatpr.org")
+    (Chatroom "chatroom.org")
+    (Chatster "chatster.org")
+    (ChatX "chatx.net")
+    (China263 "263.net")
+    (Cineplex1 "cineplex1.com")
+    (CNN "cnn.com")
+    (CobraNet "cobra.net")
+    (Coolchat "coolchat.net")
+    (Criten "criten.net")
+    (Cyberchat "cyberchat.org")
+    (CyGanet "cyga.net")
+    (DALnet "dal.net")
+    (Dark-Tou-Net "d-t-net.de")
+    (Darkfire "darkfire.net")
+    (DarkMyst "darkmyst.org")
+    (Darkserv "darkserv.net")
+    (Darksystem "darksystem.com")
+    (Darktree "darktree.net")
+    (DayNet "daynet.org")
+    (Deepspace "deepspace.org")
+    (Different "different.net")
+    (Digarix "digarix.net")
+    (Digatech "digatech.net")
+    (Digital-Base "digital-base.net")
+    (Digitalirc "digitalirc.net")
+    (Discussioni "discussioni.org")
+    (DorukNet "doruk.net.tr")
+    (DWChat "dwchat.net")
+    (Dynastynet "dynastynet.net")
+    (EFnet nil)
+    (EgyptianIRC "egyptianirc.net")
+    (Eircnet "eircnet.org")
+    (Eleethal "eleethal.com")
+    (EntertheGame "enterthegame.com")
+    (EpiKnet "epiknet.org")
+    (EsperNet "esper.net")
+    (Esprit "esprit.net")
+    (euIRC "euirc.net")
+    (Evilzinc "evilzinc.net")
+    (ExodusIRC "exodusirc.net")
+    (FDFnet "fdfnet.net")
+    (FEFnet "fef.net")
+    (Financialchat "financialchat.com")
+    (Forestnet "forestnet.org")
+    (ForeverChat "foreverchat.net")
+    (Fraggers "fraggers.co.uk")
+    (FreedomChat "freedomchat.net")
+    (FreedomIRC "freedomirc.net")
+    (freenode "freenode.net")
+    (FunNet "funnet.org")
+    (GalaxyNet "galaxynet.org")
+    (Gamesnet "gamesnet.net")
+    (GammaForce "gammaforce.org")
+    (GIKInet "giki.edu.pk")
+    (GizNet "giznet.org")
+    (Globalchat "globalchat.org")
+    (GlobIRC "globirc.net")
+    (Goldchat "goldchat.nl")
+    (Goodchatting "goodchatting.com")
+    (GravityLords "gravitylords.net")
+    (GRnet "irc.gr")
+    (GulfChat "gulfchat.net")
+    (HabberNet "habber.net")
+    (HanIRC "hanirc.org")
+    (Hellenicnet "mirc.gr")
+    (IceNet "icenet.org.za")
+    (ICQnet "icq.com")
+    (iip "anon.iip")
+    (Infatech "infatech.net")
+    (Infinity "infinity-irc.org")
+    (Infomatrix "infomatrix.net")
+    (Inside3D "inside3d.net")
+    (InterlinkChat "interlinkchat.net")
+    (IRC-Chile "irc.cl")
+    (IRC-Hispano "irc-hispano.org")
+    (IRCchat "ircchat.tk")
+    (IRCGate "ircgate.net")
+    (IRCGeeks "ircgeeks.org")
+    (IRChat "irchat.net")
+    (IrcLordz "irclordz.com")
+    (IrcMalta "ircmalta.org")
+    (IRCnet nil)
+    (IRCSoulZ "ircsoulz.net")
+    (IRCSul "wnet.com.br")
+    (IrcTalk "irctalk.net")
+    (Irctoo "irctoo.net")
+    (IRCtown "irc.irctown.net")
+    (IRCworld "ircworld.org")
+    (ircXtreme "ircXtreme.net")
+    (Israelnet "israel.net")
+    (K0wNet "k0w.net")
+    (KDFSnet "kdfs.net")
+    (Kemik "kemik.net")
+    (Kewl\.Org "kewl.org")
+    (Kickchat "kickchat.com")
+    (KidsWorld "kidsworld.org")
+    (Knightnet "knightnet.net")
+    (Konfido\.Net "konfido.net")
+    (Kreynet "krey.net")
+    (Krono "krono.net")
+    (Krushnet "krushnet.org")
+    (LagNet "lagnet.org.za")
+    (Librenet "librenet.net")
+    (LinkNet "link-net.org")
+    (Liquidized "liquidized.net")
+    (M-IRC "m-sys.org")
+    (MagicStar "magicstar.net")
+    (Mavra "mavra.net")
+    (MediaDriven "mediadriven.com")
+    (mIRC-X "mircx.com")
+    (Morat "morat.net")
+    (MusicCity "musiccity.com")
+    (Mysteria "mysteria.net")
+    (Mysterychat "mysterychat.net")
+    (Mystical "mystical.net")
+    (Narancs "narancs.com")
+    (Net-France "net-france.com")
+    (Nevernet "nevernet.net")
+    (Newnet "newnet.net")
+    (Nexusirc "nexusirc.org")
+    (NightStar "nightstar.net")
+    (NitrousNet "nitrousnet.net")
+    (Novernet "novernet.com")
+    (Nullrouted "nullrouted.org")
+    (NullusNet "nullus.net")
+    (OpChat "opchat.org")
+    (Openprojects "openprojects.net")
+    (Othernet "othernet.org")
+    (OtherSide "othersideirc.net")
+    (Outsiderz "outsiderz.com")
+    (OzOrg "oz.org")
+    (Peacefulhaven "peacefulhaven.net")
+    (PhazedIRC "phazedirc.net")
+    (Philchat "philchat.net")
+    (phrozN "phrozn.net")
+    (PiNet "praetorians.org")
+    (Pinoycentral "abs-cbn.com")
+    (Planetarion "planetarion.com")
+    (POLNet "ircnet.pl")
+    (Psionics "psionics.net")
+    (PTirc "ptirc.com.pt")
+    (PTlink "ptlink.net")
+    (PTnet "ptnet.org")
+    (QChat "qchat.net")
+    (QuakeNet "quakenet.org")
+    (Realirc "realirc.org")
+    (RealmNET "realmnet.com")
+    (Rebelchat "rebelchat.org")
+    (Red-Latina "red-latina.org")
+    (RedLatona "redlatona.net")
+    (Relicnet "relic.net")
+    (Rezosup "rezosup.org")
+    (Risanet "risanet.com")
+    (Rubiks "rubiks.net")
+    (Rusnet "nil")
+    (Sandnet "sandnet.net")
+    (Scunc "scunc.net")
+    (SerbianCafe "serbiancafe.ws")
+    (SexNet "sexnet.org")
+    (ShadowFire "shadowfire.org")
+    (ShadowWorld "shadowworld.net")
+    (SkyNet "bronowski.pl")
+    (SlashNET "slashnet.org")
+    (SolarStone "solarstone.net")
+    (Sorcery "sorcery.net")
+    (SourceIRC "sourceirc.net")
+    (SpaceTronix "spacetronix.net")
+    (Spirit-Harmony "spirit-harmony.com")
+    (StarChat "starchat.net")
+    (StarEquinox "starequinox.net")
+    (Starlink "starlink.net")
+    (starlink-irc "starlink-irc.org")
+    (StarWars-IRC "starwars-irc.net")
+    (Stormdancing "stormdancing.net")
+    (Superchat "superchat.org")
+    (Sysopnet "sysopnet.org")
+    (Telstra "telstra.com")
+    (TR-net "dominet.com.tr")
+    (Tri-net "tri-net.org")
+    (TriLink "ft4u.net")
+    (TurkishChat "turkishchat.org")
+    (UberNinja "uberninja.net")
+    (UICN "uicn.net")
+    (UltraIRC "ultrairc.net")
+    (UnderChat "underchat.it")
+    (undernet "undernet.org")
+    (UnderZ "underz.org")
+    (UniChat "irc.uni-chat.net")
+    (UnionLatina "unionlatina.org")
+    (Univers "univers.org")
+    (UnixR "unixr.net")
+    (Vidgamechat "vidgamechat.com")
+    (VirtuaNet "virtuanet.org")
+    (Vitamina "vitamina.ca")
+    (Voila "voila.fr")
+    (Wahou "wf-net.org")
+    (Warpednet "warped.net")
+    (Weaklinks "weaklinks.net")
+    (Webnet "webchat.org")
+    (WinChat "winchat.net")
+    (WinIRC "winirc.org")
+    (WorldIRC "worldirc.org")
+    (WyldRyde "wyldryde.net")
+    (XentoniX "xentonix.net")
+    (Xevion "xevion.net")
+    (XNet "xnet.org")
+    (XWorld "xworld.org")
+    (ZAnetNet "zanet.net")
+    (ZAnetOrg "zanet.org.za")
+    (ZiRC "zirc.org")
+    (ZUHnet "zuh.net")
+    (Zurna "zurna.net"))
   "Alist of IRC networks. (NET MATCHER) where
 NET is a symbol naming that IRC network and
 MATCHER is used to find a corresponding network to a server while connected to
   :group 'erc
   :type 'sexp)
 
+(defvar erc-network nil
+  "The name of the network you are connected to (a symbol).")
+(make-variable-buffer-local 'erc-network)
+
+;; Functions:
+
+;;;###autoload
+(defun erc-determine-network ()
+  "Return the name of the network or \"Unknown\" as a symbol.  Use the
+server parameter NETWORK if provided, otherwise parse the server name and
+search for a match in `erc-networks-alist'."
+  ;; The server made it easy for us and told us the name of the NETWORK
+  (if (assoc "NETWORK" erc-server-parameters)
+      (intern (cdr (assoc "NETWORK" erc-server-parameters)))
+    (or
+     ;; Loop through `erc-networks-alist' looking for a match.
+     (loop for (name matcher) in erc-networks-alist
+           when (and matcher
+                     (string-match (concat matcher "\\'")
+                                   erc-announced-server-name))
+           do (return name))
+     'Unknown)))
+
+(defun erc-network ()
+  "Return the value of `erc-network' for the current server."
+  (with-current-buffer (erc-server-buffer) erc-network))
+
+(defun erc-current-network ()
+  "Deprecated.  Use `erc-network' instead.  Return the name of this server's
+network as a symbol."
+  (with-current-buffer (erc-server-buffer)
+    (intern (downcase (symbol-name erc-network)))))
+
+(if (featurep 'xemacs)
+    (make-obsolete 'erc-current-network 'erc-network)
+  (make-obsolete 'erc-current-network 'erc-network "Obsolete since erc-nets 1.5"))
+
+(defun erc-network-name ()
+  "Deprecated.  Use `erc-network' instead.  Return the value of `erc-network'
+as a string."
+  (with-current-buffer (erc-server-buffer) (symbol-name erc-network)))
+
+(if (featurep 'xemacs)
+    (make-obsolete 'erc-network-name 'erc-network)
+  (make-obsolete 'erc-network-name 'erc-network "Obsolete since erc-nets 1.5"))
+
+(defun erc-set-network-name (proc parsed)
+  "Set `erc-network' to the value returned by `erc-determine-network'."
+  (unless erc-connected
+    (setq erc-network (erc-determine-network)))
+  nil)
+
+(defun erc-unset-network-name (nick ip reason)
+  "Set `erc-network' to nil."
+  (setq erc-network nil)
+  nil)
+
+(add-hook 'erc-server-375-hook 'erc-set-network-name)
+(add-hook 'erc-server-422-hook 'erc-set-network-name)
+(add-hook 'erc-disconnected-hook 'erc-unset-network-name)
+
 (defun erc-ports-list (ports)
-  (let (plst)
+  "Return a list of PORTS.
+
+PORTS should be a list of either:
+  A number, in which case it is returned a list.
+  Or a pair of the form (LOW HIGH), in which case, a list of all the
+  numbers between LOW and HIGH (inclusive) is returned.
+
+As an example:
+  (erc-ports-list '(1)) => (1)
+  (erc-ports-list '((1 5))) => (1 2 3 4 5)
+  (erc-ports-list '(1 (3 5))) => (1 3 4 5)"
+  (let (result)
     (dolist (p ports)
       (cond ((numberp p)
-	     (setq plst (append plst (list p))))
+	     (push p result))
 	    ((listp p)
-	     (setq plst
-		   (append plst
-			   (loop for i from (car p) to (nth 1 p) collect i))))))
-    plst))
+	     (setq result (nconc (loop for i from (cadr p) downto (car p)
+                                       collect i)
+                                 result)))))
+    (nreverse result)))
 
 ;;;###autoload
 (defun erc-server-select ()
-  "Interactively select a server using the `erc-networks-alist' and
-`erc-server-alist' to connect to."
+  "Interactively select a server to connect to using the `erc-networks-alist'
+and `erc-server-alist'."
   (interactive)
   (let* ((completion-ignore-case t)
 	 (net (intern
 ;; think it is worth the effort.
 
 (defcustom erc-settings 
-  '((pals Freenode ("kensanata" "shapr" "anti\\(fuchs\\|gone\\)"))
-    (format-nick-function (Freenode "#emacs") erc-format-@nick))
+  '((pals freenode ("kensanata" "shapr" "anti\\(fuchs\\|gone\\)"))
+    (format-nick-function (freenode "#emacs") erc-format-@nick))
   "Alist of configuration options. (VARNAME SCOPE VALUE) where
 VARNAME is a symbol identifying the configuration option,
 SCOPE is either a symbol which identifies an entry from
 		     items nil)))))
     val))
 
-(erc-get 'pals 'Freenode)
+(erc-get 'pals 'freenode)
 	       
 	       
   
 
 (provide 'erc-nets)
+
+;;; erc-nets.el ends here
 
 (require 'erc)
 
-(defconst erc-netsplit-version "Revision: 1.8"
+(defconst erc-netsplit-version "$Revision$"
   "ERC netsplit version.")
 
 (defgroup erc-netsplit nil
 ;;; erc-nickserv.el --- Identify to NickServ
 
-;; Copyright (C) 2002  Mario Lang
+;; Copyright (C) 2002, 2003, 2004  Free Software Foundation, Inc.
 
 ;; This file is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
 ;;; Code:
 
 (require 'erc)
+(require 'erc-nets)
 
-(defconst erc-nickserv-version "Revision: 1.13"
+(defconst erc-nickserv-version "$Revision$"
   "ERC NickServ revision.")
 
 ;; Customization:
 ;; Variables:
 
 (defvar erc-nickserv-alist
-  '((dalnet
+  '((DALnet
      "NickServ!service@dal.net"
      "/msg\\s-NickServ@services.dal.net\\s-IDENTIFY\\s-<password>"
      "NickServ@services.dal.net"
      "NickServ"
      "IDENTIFY"
      nil)
-    (galaxynet
+    (GalaxyNet
      "NS!nickserv@galaxynet.org"
      "Please\\s-change\\s-nicks\\s-or\\s-authenticate."
      "NS@services.galaxynet.org"
      "AUTH"
      t)
-    (slashnet
+    (SlashNET
      "NickServ!services@services.slashnet.org"
      "/msg\\s-NickServ\\s-IDENTIFY\\s-password"
      "NickServ@services.slashnet.org"
      "IDENTIFY"
      nil
      "SQUERY")
-    (brasnet
+    (BRASnet
      "NickServ!services@brasnet.org"
      "/NickServ\\s-IDENTIFY\\s-senha"
      "NickServ"
      "IDENTIFY"
      nil
      "")
-     (austnet "NickOP!service@austnet.org"
+     (Austnet "NickOP!service@austnet.org"
       "/msg\\s-NickOP@austnet.org\\s-identify\\s-<password>"
       "nickop@austnet.org"
       "identify"
 Every element in the list has the form
   \(SYMBOL NICKSERV REGEXP NICK KEYWORD USE-CURRENT ANSWER)
 
-SYMBOL is a network identifier, a symbol, as used in `erc-networks'.