User: adrian
Date: 05/10/15 20:15:36
Modified: packages/xemacs-packages/erc AUTHORS CREDITS ChangeLog
ChangeLog.2002.upstream ChangeLog.2004.upstream
ChangeLog.upstream Makefile Makefile.upstream NEWS
erc-autoaway.el erc-autojoin.el erc-backend.el
erc-bbdb.el erc-button.el erc-chess.el
erc-compat.el erc-complete.el erc-dcc.el
erc-ezbounce.el erc-fill.el erc-goodies.el
erc-ibuffer.el erc-identd.el erc-imenu.el
erc-lang.el erc-list.el erc-log.el erc-match.el
erc-menu.el erc-nets.el erc-netsplit.el
erc-nicklist.el erc-nickserv.el erc-notify.el
erc-page.el erc-pcomplete.el erc-ring.el
erc-sound.el erc-speedbar.el erc-spelling.el
erc-stamp.el erc-track.el erc-truncate.el
erc-viper.el erc-xdcc.el erc.el servers.pl
Log:
packages: sync of erc with upstream revision 1.774
-------------------- ChangeLog entries follow: --------------------
xemacs-packages/erc/ChangeLog addition:
2005-10-15 Adrian Aichner <adrian(a)xemacs.org>
* Full sync with upstream revision 1.774.
* AUTHORS:
* CREDITS:
* ChangeLog.2002.upstream:
* ChangeLog.2004.upstream:
* ChangeLog.upstream:
* Makefile (AUTHOR_VERSION):
* Makefile.upstream:
* NEWS:
* erc-autoaway.el:
* erc-autoaway.el (erc-autoaway-version):
* erc-autoaway.el (defvar):
* erc-autoaway.el (erc-autoaway-message):
* erc-autojoin.el:
* erc-autojoin.el (erc-autojoin-version):
* erc-autojoin.el (erc-autojoin-channels):
* erc-autojoin.el (erc-autojoin-add):
* erc-autojoin.el (erc-autojoin-remove):
* erc-backend.el:
* erc-backend.el (erc-server-current-nick): New.
* erc-backend.el (erc-server-process): New.
* erc-backend.el (erc-session-server): New.
* erc-backend.el (erc-session-port): New.
* erc-backend.el (erc-server-announced-name): New.
* erc-backend.el (erc-server-parameters): New.
* erc-backend.el (erc-server-connected): New.
* erc-backend.el (erc-server-quitting): New.
* erc-backend.el (erc-server-lines-sent): New.
* erc-backend.el (erc-server-last-peers): New.
* erc-backend.el (erc-server-last-sent-time): New.
* erc-backend.el (erc-server-last-ping-time): New.
* erc-backend.el (erc-server-lag): New.
* erc-backend.el (erc-server-filter-data): New.
* erc-backend.el (erc-server-duplicates): New.
* erc-backend.el (erc-server-processing-p): New.
* erc-backend.el (erc-server-flood-last-message): New.
* erc-backend.el (erc-server-flood-queue): New.
* erc-backend.el (erc-server-flood-timer): New.
* erc-backend.el (erc-server): New.
* erc-backend.el (erc-server-auto-reconnect): New.
* erc-backend.el (erc-split-line-length): New.
* erc-backend.el (erc-server-coding-system): New.
* erc-backend.el (erc-encoding-coding-alist): New.
* erc-backend.el (erc-server-connect-function): New.
* erc-backend.el (erc-server-prevent-duplicates): New.
* erc-backend.el (erc-server-duplicate-timeout): New.
* erc-backend.el (erc-server-flood-margin): New.
* erc-backend.el (erc-server-flood-penalty): New.
* erc-backend.el (erc-server-send-ping-interval): New.
* erc-backend.el (erc-server-ping-handler): New.
* erc-backend.el (erc-split-line): New.
* erc-backend.el (erc-upcase-first-word): New.
* erc-backend.el (erc-server-setup-periodical-server-ping): New.
* erc-backend.el (erc-server-connect): New.
* erc-backend.el (erc-server-filter-function): New.
* erc-backend.el (erc-process-sentinel-1): New.
* erc-backend.el (erc-process-sentinel): New.
* erc-backend.el (erc-coding-system-for-target): New.
* erc-backend.el (erc-decode-string-from-target): New.
* erc-backend.el (erc-send-line): New.
* erc-backend.el (erc-server-send): New.
* erc-backend.el (erc-server-send-queue): New.
* erc-backend.el (erc-message): New.
* erc-backend.el (erc-send-ctcp-message): New.
* erc-backend.el (erc-send-ctcp-notice): New.
* erc-backend.el (erc-decode-parsed-server-response):
* erc-backend.el (erc-handle-parsed-server-response):
* erc-backend.el (erc-handle-unknown-server-response):
* erc-backend.el (INVITE):
* erc-backend.el (JOIN):
* erc-backend.el (PING):
* erc-backend.el (PONG):
* erc-backend.el (PRIVMSG):
* erc-backend.el (001):
* erc-backend.el (MOTD):
* erc-backend.el (004):
* erc-backend.el (252):
* erc-backend.el (321):
* erc-backend.el (322):
* erc-backend.el (352):
* erc-backend.el (401):
* erc-bbdb.el:
* erc-bbdb.el (erc-bbdb-version):
* erc-bbdb.el (erc-bbdb-irc-highlight-field):
* erc-bbdb.el (erc-bbdb-bitlbee-name-field): New.
* erc-bbdb.el (erc-bbdb-search-name-and-create):
* erc-bbdb.el (erc-bbdb-insinuate-and-show-entry):
* erc-bbdb.el (erc-bbdb-whois):
* erc-bbdb.el (erc-bbdb-JOIN):
* erc-bbdb.el (erc-bbdb-NICK):
* erc-button.el:
* erc-button.el (erc-button-version):
* erc-chess.el:
* erc-chess.el (erc-chess-version):
* erc-chess.el (erc-chess-handler):
* erc-chess.el (erc-chess-engine-create):
* erc-compat.el:
* erc-compat.el (erc-compat-version):
* erc-compat.el (not):
* erc-compat.el (erc-view-mode-enter):
* erc-compat.el ('erc-view-mode-enter): New.
* erc-complete.el:
* erc-complete.el (erc-complete-version):
* erc-complete.el (erc-nick-completion-exclude-myself):
* erc-complete.el (erc-try-complete-nick):
* erc-dcc.el:
* erc-dcc.el (erc-dcc-version):
* erc-dcc.el (erc-dcc-host):
* erc-dcc.el (erc-cmd-DCC):
* erc-dcc.el (erc-dcc-do-CHAT-command):
* erc-dcc.el (erc-dcc-do-LIST-command):
* erc-dcc.el (erc-dcc-handle-ctcp-send):
* erc-dcc.el (erc-dcc-chat-request): New.
* erc-dcc.el (erc-dcc-handle-ctcp-chat):
* erc-dcc.el (erc-dcc-get-parent): New.
* erc-dcc.el (erc-dcc-nick):
* erc-dcc.el (erc-dcc-send-file):
* erc-dcc.el (erc-dcc-get-file):
* erc-dcc.el (erc-dcc-get-filter):
* erc-dcc.el (erc-dcc-get-sentinel):
* erc-dcc.el (erc-cmd-CREQ):
* erc-dcc.el (erc-cmd-SREQ):
* erc-dcc.el (erc-dcc-chat):
* erc-dcc.el (erc-dcc-chat-setup):
* erc-dcc.el (erc-dcc-chat-accept):
* erc-dcc.el (erc-dcc-chat-parse-output):
* erc-dcc.el (erc-dcc-chat-close):
* erc-ezbounce.el:
* erc-ezbounce.el (erc-ezb-version):
* erc-ezbounce.el (erc-cmd-ezb):
* erc-ezbounce.el (erc-ezb-identify):
* erc-ezbounce.el (erc-ezb-select):
* erc-ezbounce.el (erc-ezb-select-session):
* erc-fill.el:
* erc-fill.el (erc-fill-version):
* erc-goodies.el (erc-scroll-to-bottom):
* erc-goodies.el (erc-occur):
* erc-ibuffer.el:
* erc-ibuffer.el (erc-ibuffer-version):
* erc-ibuffer.el (erc-server):
* erc-ibuffer.el (erc-server-name):
* erc-ibuffer.el (erc-target):
* erc-ibuffer.el (erc-topic):
* erc-ibuffer.el (erc-away):
* erc-ibuffer.el (erc-channel-modes):
* erc-identd.el:
* erc-identd.el (erc-identd-start):
* erc-imenu.el:
* erc-imenu.el (erc-imenu-version):
* erc-imenu.el (erc-unfill-notice):
* erc-imenu.el (erc-create-imenu-index):
* erc-lang.el:
* erc-list.el:
* erc-list.el (erc-list-version):
* erc-list.el (erc-chanlist):
* erc-list.el (erc-chanlist-highlight-line):
* erc-list.el (erc-chanlist-toggle-sort-state):
* erc-log.el:
* erc-log.el (erc-log-version):
* erc-log.el (erc-generate-log-file-name-function):
* erc-log.el (log):
* erc-log.el (erc-save-buffer-in-logs):
* erc-match.el:
* erc-match.el (erc-match-version):
* erc-match.el (erc-text-matched-hook):
* erc-match.el (erc-add-fool):
* erc-match.el (erc-log-matches):
* erc-match.el (away)): Removed.
* erc-match.el (erc-log-matches-make-buffer):
* erc-match.el (erc-log-matches-come-back):
* erc-menu.el:
* erc-menu.el (erc-menu-version):
* erc-menu.el (erc-menu-definition):
* erc-menu.el ("erc"):
* erc-nets.el:
* erc-nets.el (erc-nets-version):
* erc-nets.el (erc-networks-alist):
* erc-nets.el (erc-determine-network):
* erc-nets.el (nil):
* erc-nets.el (erc-set-network-name):
* erc-nets.el (erc-nets):
* erc-netsplit.el:
* erc-netsplit.el (erc-netsplit-version):
* erc-nicklist.el:
* erc-nicklist.el (nil):
* erc-nicklist.el (erc-nicklist-version):
* erc-nicklist.el (erc-nicklist-use-icons): New.
* erc-nicklist.el (erc-nicklist-icons-directory): New.
* erc-nicklist.el (erc-nicklist-voiced-position): New.
* erc-nicklist.el (erc-nicklist-bitlbee-connected-p): New.
* erc-nicklist.el (erc-nicklist-images-alist): New.
* erc-nicklist.el (erc-nicklist-insert-medium-name-or-icon): New.
* erc-nicklist.el (erc-nicklist-search-for-nick): New.
* erc-nicklist.el (erc-nicklist-insert-contents): New.
* erc-nicklist.el (erc-nicklist-update):
* erc-nicklist.el (erc-nicklist-mode-map):
* erc-nicklist.el (erc-nicklist-call-erc-command):
* erc-nicklist.el (erc-nicklist-cmd-QUERY): New.
* erc-nicklist.el (erc-nicklist-kbd-cmd-QUERY): New.
* erc-nicklist.el (erc-nicklist-menu):
* erc-nicklist.el (erc-nicklist-kbd-menu): New.
* erc-nicklist.el (erc-nicklist-channel-nicks): Removed.
* erc-nicklist.el (erc-nicklist-channel-users-info): New.
* erc-nickserv.el:
* erc-nickserv.el (erc-nickserv-version):
* erc-nickserv.el (erc-nickserv-alist):
* erc-nickserv.el (erc-nickserv-call-identify-function):
* erc-notify.el:
* erc-notify.el (erc-notify-list):
* erc-notify.el (erc-notify-timer):
* erc-notify.el (erc-notify-JOIN):
* erc-notify.el (erc-notify-NICK):
* erc-notify.el (erc-notify-QUIT):
* erc-notify.el (erc-cmd-NOTIFY):
* erc-page.el:
* erc-page.el (erc-ctcp-query-PAGE):
* erc-page.el (erc-cmd-PAGE):
* erc-pcomplete.el:
* erc-pcomplete.el (erc-pcomplete-version):
* erc-pcomplete.el (pcomplete-erc-all-nicks):
* erc-pcomplete.el (pcomplete-erc-channels):
* erc-ring.el:
* erc-ring.el (erc-ring-version):
* erc-sound.el:
* erc-speedbar.el:
* erc-speedbar.el (erc-speedbar-version):
* erc-speedbar.el (erc-speedbar-buttons):
* erc-speedbar.el (erc-speedbar-server-buttons):
* erc-speedbar.el (erc-speedbar-channel-buttons):
* erc-speedbar.el (erc-speedbar-expand-channel):
* erc-spelling.el:
* erc-spelling.el (erc-spelling-version):
* erc-spelling.el (erc-spelling-dictionaries): Removed.
* erc-stamp.el:
* erc-stamp.el (erc-stamp-version):
* erc-stamp.el (erc-add-timestamp):
* erc-stamp.el (erc-format-timestamp):
* erc-track.el:
* erc-track.el (erc-track-version):
* erc-track.el (erc-track-visibility):
* erc-track.el (track):
* erc-track.el (erc-modified-channels-update):
* erc-track.el (erc-track-modified-channels):
* erc-track.el (erc-track-switch-direction):
* erc-track.el (erc-track-sort-by-activest):
* erc-truncate.el:
* erc-viper.el:
* erc-xdcc.el:
* erc.el:
* erc.el (erc-version-string):
* erc.el (erc-menu):
* erc.el (erc-display):
* erc.el (erc-coding-systems): Removed.
* erc.el (erc-backend):
* erc.el ('erc-send-command): New.
* erc.el (erc-session-password):
* erc.el (erc-session-server): Removed.
* erc.el (erc-disconnected-hook):
* erc.el (erc-session-port): Removed.
* erc.el (erc-announced-server-name): Removed.
* erc.el (erc-server-parameters): Removed.
* erc.el (erc-process): Removed.
* erc.el (erc-connected): Removed.
* erc.el (erc-server-user):
* erc.el (erc-channel-user):
* erc.el (erc-get-server-user):
* erc.el (erc-add-server-user):
* erc.el (erc-remove-server-user):
* erc.el (erc-change-user-nickname):
* erc.el (erc-remove-channel-users):
* erc.el (channel-topic): Removed.
* erc.el (erc-channel-topic): New.
* erc.el (channel-modes): Removed.
* erc.el (erc-channel-modes): New.
* erc.el (erc-prompt):
* erc.el (erc-notice-prefix):
* erc.el (erc-prompt-for-channel-key):
* erc.el (erc-auto-reconnect): Removed.
* erc.el (erc-flood-protect):
* erc.el (erc-flood-limit): Removed.
* erc.el (erc-flood-limit2): Removed.
* erc.el (erc-mode-map):
* erc.el (erc-server-buffer):
* erc.el (erc-server-buffer-live-p):
* erc.el (erc-ison-p):
* erc.el (erc-mode):
* erc.el (erc-generate-new-buffer-name):
* erc.el (erc-with-buffer):
* erc.el (erc-buffer-filter):
* erc.el (erc-buffer-list):
* erc.el (erc-iswitchb):
* erc.el (current-nick): Removed.
* erc.el (channel-user-limit): Removed.
* erc.el (erc-channel-user-limit): New.
* erc.el (channel-key): Removed.
* erc.el (erc-channel-key): New.
* erc.el (last-peers): Removed.
* erc.el (invitation): Removed.
* erc.el (erc-invitation): New.
* erc.el (away): Removed.
* erc.el (erc-away): New.
* erc.el (channel-list): Removed.
* erc.el (erc-channel-list): New.
* erc.el (last-sent-time): Removed.
* erc.el (last-ping-time): Removed.
* erc.el (erc-modules):
* erc.el (last-ctcp-time): Removed.
* erc.el (erc-lines-sent): Removed.
* erc.el (erc-bytes-sent): Removed.
* erc.el (quitting): Removed.
* erc.el (bad-nick): Removed.
* erc.el (erc-bad-nick): New.
* erc.el (erc):
* erc.el (erc-previous-read): Removed.
* erc.el (erc-select-read-args):
* erc.el (erc-select-ssl):
* erc.el (erc-connect-function): Removed.
* erc.el (erc-connect): Removed.
* erc.el (erc-log-irc-protocol):
* erc.el (erc-split-multiline): Removed.
* erc.el (erc-toggle-debug-irc-protocol):
* erc.el (erc-process-filter): Removed.
* erc.el (erc-send-action):
* erc.el (erc-process-sentinel-1): Removed.
* erc.el (erc-display-line-1):
* erc.el (erc-process-sentinel): Removed.
* erc.el (erc-flood-exceeded-p): Removed.
* erc.el (erc-send-command): Removed.
* erc.el (erc-display-line):
* erc.el (erc-default-coding-system): Removed.
* erc.el (erc-encoding-coding-alist): Removed.
* erc.el (erc-send-input-line):
* erc.el (erc-coding-system-for-target): Removed.
* erc.el (erc-encode-string-for-target): Removed.
* erc.el (erc-decode-string-from-target): Removed.
* erc.el (erc-split-command): Removed.
* erc.el (erc-process-input-line):
* erc.el (erc-upcase-first-word): Removed.
* erc.el (erc-send-ctcp-message): Removed.
* erc.el (erc-send-ctcp-notice): Removed.
* erc.el (erc-cmd-default):
* erc.el (erc-cmd-UNIGNORE):
* erc.el (erc-cmd-OPS):
* erc.el (erc-cmd-AWAY):
* erc.el (erc-cmd-JOIN):
* erc.el (erc-cmd-NAMES):
* erc.el (erc-cmd-KICK):
* erc.el (erc-cmd-WHOIS):
* erc.el (erc-send-message):
* erc.el (erc-message): Removed.
* erc.el (erc-cmd-MODE):
* erc.el (erc-cmd-NICK):
* erc.el (erc-cmd-PART):
* erc.el (erc-cmd-QUOTE):
* erc.el (erc-cmd-QUIT):
* erc.el (erc-cmd-BYE):
* erc.el (erc-kill-queries-on-quit): Removed.
* erc.el (erc-cmd-SV):
* erc.el (erc-cmd-DEOP):
* erc.el (erc-cmd-OP):
* erc.el (erc-cmd-TIME):
* erc.el (erc-cmd-TOPIC):
* erc.el (erc-cmd-APPENDTOPIC):
* erc.el (erc-cmd-CLEARTOPIC):
* erc.el (channel-banlist): Removed.
* erc.el (erc-channel-banlist): New.
* erc.el (erc-cmd-BANLIST):
* erc.el (erc-cmd-MASSUNBAN):
* erc.el (erc-display-prompt):
* erc.el (erc-input-message):
* erc.el (erc-join-channel):
* erc.el (erc-set-topic):
* erc.el (erc-set-channel-limit):
* erc.el (erc-set-channel-key):
* erc.el (erc-quit-server):
* erc.el (erc-query):
* erc.el (erc-duplicates): Removed.
* erc.el (erc-duplicate-timeout): Removed.
* erc.el (erc-prevent-duplicates): Removed.
* erc.el (erc-nickname-in-use):
* erc.el (erc-server-hooks):
* erc.el (erc-auto-query):
* erc.el (erc-lag): Removed.
* erc.el (erc-send-ping-interval): Removed.
* erc.el (erc-ping-handler): Removed.
* erc.el (erc-setup-periodical-server-ping): Removed.
* erc.el (erc-echo-notice-in-user-buffers):
* erc.el (erc-echo-notice-in-user-and-target-buffers):
* erc.el (erc-echo-notice-in-first-user-buffer):
* erc.el (erc-server-version): Removed.
* erc.el (erc-banlist-store):
* erc.el (erc-banlist-finished):
* erc.el (erc-banlist-update):
* erc.el (erc-connection-established):
* erc.el (erc-set-initial-user-mode):
* erc.el (erc-ctcp-query-FINGER):
* erc.el (erc-process-away):
* erc.el (erc-update-channel-topic):
* erc.el (erc-set-modes):
* erc.el (erc-update-modes):
* erc.el (erc-update-channel-limit):
* erc.el (erc-update-channel-key):
* erc.el (erc-handle-user-status-change):
* erc.el (erc-send-current-line):
* erc.el (erc-send-input):
* erc.el (erc-display-command):
* erc.el (erc-send-single-line): Removed.
* erc.el (erc-display-msg):
* erc.el (erc-set-current-nick):
* erc.el (erc-current-nick):
* erc.el (erc-add-default-channel):
* erc.el (erc-ignored-reply-p):
* erc.el (with-erc-channel-buffer): Removed.
* erc.el (erc-toggle-flood-control):
* erc.el (erc-toggle-channel-mode):
* erc.el (erc-login):
* erc.el (erc-determine-parameters):
* erc.el (erc-away-p):
* erc.el (erc-mode-line-format):
* erc.el (erc-format-target):
* erc.el (erc-format-target-and/or-server):
* erc.el (erc-format-away-status):
* erc.el (erc-format-channel-modes):
* erc.el (erc-update-mode-line-buffer):
* erc.el (erc-arrange-session-in-multiple-windows):
* erc.el (erc-process-alive):
* erc.el (erc-kill-server):
* erc.el (erc-kill-channel):
* servers.pl:
Revision Changes Path
1.4 +1 -1 XEmacs/packages/xemacs-packages/erc/AUTHORS
Index: AUTHORS
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/AUTHORS,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- AUTHORS 2005/04/10 14:47:32 1.3
+++ AUTHORS 2005/10/15 18:15:25 1.4
@@ -4,7 +4,7 @@ antifuchs Andreas Fuchs <asf(a)void.at>
benj2 Benjamin Drieu <benj(a)debian.org>
bigmike160 Michael Olson <mwolson(a)gnu.org>
bojohan Johan Bockgard <bojohan(a)users.sourceforge.net>
-disumu Diane Murray <dsm(a)muenster.de>
+disumu Diane Murray <disumu(a)x3y2z1.net>
elisteran Brian Palmer <bpalmer(a)gmail.com>
emcdloc Edward O'Connor <ted(a)oconnor.cx>
forcer Jorgen Schaefer <forcer(a)users.sourceforge.net>
1.6 +10 -1 XEmacs/packages/xemacs-packages/erc/CREDITS
Index: CREDITS
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/CREDITS,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- CREDITS 2005/06/05 15:47:00 1.5
+++ CREDITS 2005/10/15 18:15:25 1.6
@@ -21,7 +21,7 @@ Andreas Fuchs <asf(a)acm.org>:
Tijs van Bakel <smoke(a)wanadoo.nl>:
* helped a lot in crucial rewriting phase
-Diane Murray <dsm(a)muenster.de>:
+Diane Murray <disumu(a)x3y2z1.net>:
* Miscellaneous development, additions, bug fixes
* erc-nickserv.el
@@ -104,6 +104,8 @@ Simon Siegler <simon(a)trz-kril.de>:
Andreas Schwab <schwab(a)suse.de>:
* Corrected a bug in sorting of channel users (erc.el).
+ * Fixed an unnecessary use of the `format' function (erc.el).
+ * Added an entry for OFTC in erc-nickserv-alist.
Kai Fan (m_pupil AT yahoo DOT com) (aka "It's me FKtPp ;)"):
* Enhanced non-ASCII character support (erc-backend.el).
@@ -111,6 +113,13 @@ Kai Fan (m_pupil AT yahoo DOT com) (aka
Daniel Brockman (daniel AT brockman DOT se):
* Submitted small patch that fixed a load failure in erc-autoaway.el
when using Emacs21.
+
+John Paul Wallington (jpw AT pobox DOT com):
+ * Recommended replacing calls to `string-to-int' with
+ `string-to-number'.
+
+Luigi Panzeri (matley AT muppetslab DOT org):
+ * Provided an erc-nickserv-alist entry for Azzurra.
----
1.33 +538 -0 XEmacs/packages/xemacs-packages/erc/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/ChangeLog,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -p -r1.32 -r1.33
--- ChangeLog 2005/06/05 17:21:45 1.32
+++ ChangeLog 2005/10/15 18:15:26 1.33
@@ -1,3 +1,541 @@
+2005-10-15 Adrian Aichner <adrian(a)xemacs.org>
+
+ * Full sync with upstream revision 1.774.
+ * AUTHORS:
+ * CREDITS:
+ * ChangeLog.2002.upstream:
+ * ChangeLog.2004.upstream:
+ * ChangeLog.upstream:
+ * Makefile (AUTHOR_VERSION):
+ * Makefile.upstream:
+ * NEWS:
+ * erc-autoaway.el:
+ * erc-autoaway.el (erc-autoaway-version):
+ * erc-autoaway.el (defvar):
+ * erc-autoaway.el (erc-autoaway-message):
+ * erc-autojoin.el:
+ * erc-autojoin.el (erc-autojoin-version):
+ * erc-autojoin.el (erc-autojoin-channels):
+ * erc-autojoin.el (erc-autojoin-add):
+ * erc-autojoin.el (erc-autojoin-remove):
+ * erc-backend.el:
+ * erc-backend.el (erc-server-current-nick): New.
+ * erc-backend.el (erc-server-process): New.
+ * erc-backend.el (erc-session-server): New.
+ * erc-backend.el (erc-session-port): New.
+ * erc-backend.el (erc-server-announced-name): New.
+ * erc-backend.el (erc-server-parameters): New.
+ * erc-backend.el (erc-server-connected): New.
+ * erc-backend.el (erc-server-quitting): New.
+ * erc-backend.el (erc-server-lines-sent): New.
+ * erc-backend.el (erc-server-last-peers): New.
+ * erc-backend.el (erc-server-last-sent-time): New.
+ * erc-backend.el (erc-server-last-ping-time): New.
+ * erc-backend.el (erc-server-lag): New.
+ * erc-backend.el (erc-server-filter-data): New.
+ * erc-backend.el (erc-server-duplicates): New.
+ * erc-backend.el (erc-server-processing-p): New.
+ * erc-backend.el (erc-server-flood-last-message): New.
+ * erc-backend.el (erc-server-flood-queue): New.
+ * erc-backend.el (erc-server-flood-timer): New.
+ * erc-backend.el (erc-server): New.
+ * erc-backend.el (erc-server-auto-reconnect): New.
+ * erc-backend.el (erc-split-line-length): New.
+ * erc-backend.el (erc-server-coding-system): New.
+ * erc-backend.el (erc-encoding-coding-alist): New.
+ * erc-backend.el (erc-server-connect-function): New.
+ * erc-backend.el (erc-server-prevent-duplicates): New.
+ * erc-backend.el (erc-server-duplicate-timeout): New.
+ * erc-backend.el (erc-server-flood-margin): New.
+ * erc-backend.el (erc-server-flood-penalty): New.
+ * erc-backend.el (erc-server-send-ping-interval): New.
+ * erc-backend.el (erc-server-ping-handler): New.
+ * erc-backend.el (erc-split-line): New.
+ * erc-backend.el (erc-upcase-first-word): New.
+ * erc-backend.el (erc-server-setup-periodical-server-ping): New.
+ * erc-backend.el (erc-server-connect): New.
+ * erc-backend.el (erc-server-filter-function): New.
+ * erc-backend.el (erc-process-sentinel-1): New.
+ * erc-backend.el (erc-process-sentinel): New.
+ * erc-backend.el (erc-coding-system-for-target): New.
+ * erc-backend.el (erc-decode-string-from-target): New.
+ * erc-backend.el (erc-send-line): New.
+ * erc-backend.el (erc-server-send): New.
+ * erc-backend.el (erc-server-send-queue): New.
+ * erc-backend.el (erc-message): New.
+ * erc-backend.el (erc-send-ctcp-message): New.
+ * erc-backend.el (erc-send-ctcp-notice): New.
+ * erc-backend.el (erc-decode-parsed-server-response):
+ * erc-backend.el (erc-handle-parsed-server-response):
+ * erc-backend.el (erc-handle-unknown-server-response):
+ * erc-backend.el (INVITE):
+ * erc-backend.el (JOIN):
+ * erc-backend.el (PING):
+ * erc-backend.el (PONG):
+ * erc-backend.el (PRIVMSG):
+ * erc-backend.el (001):
+ * erc-backend.el (MOTD):
+ * erc-backend.el (004):
+ * erc-backend.el (252):
+ * erc-backend.el (321):
+ * erc-backend.el (322):
+ * erc-backend.el (352):
+ * erc-backend.el (401):
+ * erc-bbdb.el:
+ * erc-bbdb.el (erc-bbdb-version):
+ * erc-bbdb.el (erc-bbdb-irc-highlight-field):
+ * erc-bbdb.el (erc-bbdb-bitlbee-name-field): New.
+ * erc-bbdb.el (erc-bbdb-search-name-and-create):
+ * erc-bbdb.el (erc-bbdb-insinuate-and-show-entry):
+ * erc-bbdb.el (erc-bbdb-whois):
+ * erc-bbdb.el (erc-bbdb-JOIN):
+ * erc-bbdb.el (erc-bbdb-NICK):
+ * erc-button.el:
+ * erc-button.el (erc-button-version):
+ * erc-chess.el:
+ * erc-chess.el (erc-chess-version):
+ * erc-chess.el (erc-chess-handler):
+ * erc-chess.el (erc-chess-engine-create):
+ * erc-compat.el:
+ * erc-compat.el (erc-compat-version):
+ * erc-compat.el (not):
+ * erc-compat.el (erc-view-mode-enter):
+ * erc-compat.el ('erc-view-mode-enter): New.
+ * erc-complete.el:
+ * erc-complete.el (erc-complete-version):
+ * erc-complete.el (erc-nick-completion-exclude-myself):
+ * erc-complete.el (erc-try-complete-nick):
+ * erc-dcc.el:
+ * erc-dcc.el (erc-dcc-version):
+ * erc-dcc.el (erc-dcc-host):
+ * erc-dcc.el (erc-cmd-DCC):
+ * erc-dcc.el (erc-dcc-do-CHAT-command):
+ * erc-dcc.el (erc-dcc-do-LIST-command):
+ * erc-dcc.el (erc-dcc-handle-ctcp-send):
+ * erc-dcc.el (erc-dcc-chat-request): New.
+ * erc-dcc.el (erc-dcc-handle-ctcp-chat):
+ * erc-dcc.el (erc-dcc-get-parent): New.
+ * erc-dcc.el (erc-dcc-nick):
+ * erc-dcc.el (erc-dcc-send-file):
+ * erc-dcc.el (erc-dcc-get-file):
+ * erc-dcc.el (erc-dcc-get-filter):
+ * erc-dcc.el (erc-dcc-get-sentinel):
+ * erc-dcc.el (erc-cmd-CREQ):
+ * erc-dcc.el (erc-cmd-SREQ):
+ * erc-dcc.el (erc-dcc-chat):
+ * erc-dcc.el (erc-dcc-chat-setup):
+ * erc-dcc.el (erc-dcc-chat-accept):
+ * erc-dcc.el (erc-dcc-chat-parse-output):
+ * erc-dcc.el (erc-dcc-chat-close):
+ * erc-ezbounce.el:
+ * erc-ezbounce.el (erc-ezb-version):
+ * erc-ezbounce.el (erc-cmd-ezb):
+ * erc-ezbounce.el (erc-ezb-identify):
+ * erc-ezbounce.el (erc-ezb-select):
+ * erc-ezbounce.el (erc-ezb-select-session):
+ * erc-fill.el:
+ * erc-fill.el (erc-fill-version):
+ * erc-goodies.el (erc-scroll-to-bottom):
+ * erc-goodies.el (erc-occur):
+ * erc-ibuffer.el:
+ * erc-ibuffer.el (erc-ibuffer-version):
+ * erc-ibuffer.el (erc-server):
+ * erc-ibuffer.el (erc-server-name):
+ * erc-ibuffer.el (erc-target):
+ * erc-ibuffer.el (erc-topic):
+ * erc-ibuffer.el (erc-away):
+ * erc-ibuffer.el (erc-channel-modes):
+ * erc-identd.el:
+ * erc-identd.el (erc-identd-start):
+ * erc-imenu.el:
+ * erc-imenu.el (erc-imenu-version):
+ * erc-imenu.el (erc-unfill-notice):
+ * erc-imenu.el (erc-create-imenu-index):
+ * erc-lang.el:
+ * erc-list.el:
+ * erc-list.el (erc-list-version):
+ * erc-list.el (erc-chanlist):
+ * erc-list.el (erc-chanlist-highlight-line):
+ * erc-list.el (erc-chanlist-toggle-sort-state):
+ * erc-log.el:
+ * erc-log.el (erc-log-version):
+ * erc-log.el (erc-generate-log-file-name-function):
+ * erc-log.el (log):
+ * erc-log.el (erc-save-buffer-in-logs):
+ * erc-match.el:
+ * erc-match.el (erc-match-version):
+ * erc-match.el (erc-text-matched-hook):
+ * erc-match.el (erc-add-fool):
+ * erc-match.el (erc-log-matches):
+ * erc-match.el (away)): Removed.
+ * erc-match.el (erc-log-matches-make-buffer):
+ * erc-match.el (erc-log-matches-come-back):
+ * erc-menu.el:
+ * erc-menu.el (erc-menu-version):
+ * erc-menu.el (erc-menu-definition):
+ * erc-menu.el ("erc"):
+ * erc-nets.el:
+ * erc-nets.el (erc-nets-version):
+ * erc-nets.el (erc-networks-alist):
+ * erc-nets.el (erc-determine-network):
+ * erc-nets.el (nil):
+ * erc-nets.el (erc-set-network-name):
+ * erc-nets.el (erc-nets):
+ * erc-netsplit.el:
+ * erc-netsplit.el (erc-netsplit-version):
+ * erc-nicklist.el:
+ * erc-nicklist.el (nil):
+ * erc-nicklist.el (erc-nicklist-version):
+ * erc-nicklist.el (erc-nicklist-use-icons): New.
+ * erc-nicklist.el (erc-nicklist-icons-directory): New.
+ * erc-nicklist.el (erc-nicklist-voiced-position): New.
+ * erc-nicklist.el (erc-nicklist-bitlbee-connected-p): New.
+ * erc-nicklist.el (erc-nicklist-images-alist): New.
+ * erc-nicklist.el (erc-nicklist-insert-medium-name-or-icon): New.
+ * erc-nicklist.el (erc-nicklist-search-for-nick): New.
+ * erc-nicklist.el (erc-nicklist-insert-contents): New.
+ * erc-nicklist.el (erc-nicklist-update):
+ * erc-nicklist.el (erc-nicklist-mode-map):
+ * erc-nicklist.el (erc-nicklist-call-erc-command):
+ * erc-nicklist.el (erc-nicklist-cmd-QUERY): New.
+ * erc-nicklist.el (erc-nicklist-kbd-cmd-QUERY): New.
+ * erc-nicklist.el (erc-nicklist-menu):
+ * erc-nicklist.el (erc-nicklist-kbd-menu): New.
+ * erc-nicklist.el (erc-nicklist-channel-nicks): Removed.
+ * erc-nicklist.el (erc-nicklist-channel-users-info): New.
+ * erc-nickserv.el:
+ * erc-nickserv.el (erc-nickserv-version):
+ * erc-nickserv.el (erc-nickserv-alist):
+ * erc-nickserv.el (erc-nickserv-call-identify-function):
+ * erc-notify.el:
+ * erc-notify.el (erc-notify-list):
+ * erc-notify.el (erc-notify-timer):
+ * erc-notify.el (erc-notify-JOIN):
+ * erc-notify.el (erc-notify-NICK):
+ * erc-notify.el (erc-notify-QUIT):
+ * erc-notify.el (erc-cmd-NOTIFY):
+ * erc-page.el:
+ * erc-page.el (erc-ctcp-query-PAGE):
+ * erc-page.el (erc-cmd-PAGE):
+ * erc-pcomplete.el:
+ * erc-pcomplete.el (erc-pcomplete-version):
+ * erc-pcomplete.el (pcomplete-erc-all-nicks):
+ * erc-pcomplete.el (pcomplete-erc-channels):
+ * erc-ring.el:
+ * erc-ring.el (erc-ring-version):
+ * erc-sound.el:
+ * erc-speedbar.el:
+ * erc-speedbar.el (erc-speedbar-version):
+ * erc-speedbar.el (erc-speedbar-buttons):
+ * erc-speedbar.el (erc-speedbar-server-buttons):
+ * erc-speedbar.el (erc-speedbar-channel-buttons):
+ * erc-speedbar.el (erc-speedbar-expand-channel):
+ * erc-spelling.el:
+ * erc-spelling.el (erc-spelling-version):
+ * erc-spelling.el (erc-spelling-dictionaries): Removed.
+ * erc-stamp.el:
+ * erc-stamp.el (erc-stamp-version):
+ * erc-stamp.el (erc-add-timestamp):
+ * erc-stamp.el (erc-format-timestamp):
+ * erc-track.el:
+ * erc-track.el (erc-track-version):
+ * erc-track.el (erc-track-visibility):
+ * erc-track.el (track):
+ * erc-track.el (erc-modified-channels-update):
+ * erc-track.el (erc-track-modified-channels):
+ * erc-track.el (erc-track-switch-direction):
+ * erc-track.el (erc-track-sort-by-activest):
+ * erc-truncate.el:
+ * erc-viper.el:
+ * erc-xdcc.el:
+ * erc.el:
+ * erc.el (erc-version-string):
+ * erc.el (erc-menu):
+ * erc.el (erc-display):
+ * erc.el (erc-coding-systems): Removed.
+ * erc.el (erc-backend):
+ * erc.el ('erc-send-command): New.
+ * erc.el (erc-session-password):
+ * erc.el (erc-session-server): Removed.
+ * erc.el (erc-disconnected-hook):
+ * erc.el (erc-session-port): Removed.
+ * erc.el (erc-announced-server-name): Removed.
+ * erc.el (erc-server-parameters): Removed.
+ * erc.el (erc-process): Removed.
+ * erc.el (erc-connected): Removed.
+ * erc.el (erc-server-user):
+ * erc.el (erc-channel-user):
+ * erc.el (erc-get-server-user):
+ * erc.el (erc-add-server-user):
+ * erc.el (erc-remove-server-user):
+ * erc.el (erc-change-user-nickname):
+ * erc.el (erc-remove-channel-users):
+ * erc.el (channel-topic): Removed.
+ * erc.el (erc-channel-topic): New.
+ * erc.el (channel-modes): Removed.
+ * erc.el (erc-channel-modes): New.
+ * erc.el (erc-prompt):
+ * erc.el (erc-notice-prefix):
+ * erc.el (erc-prompt-for-channel-key):
+ * erc.el (erc-auto-reconnect): Removed.
+ * erc.el (erc-flood-protect):
+ * erc.el (erc-flood-limit): Removed.
+ * erc.el (erc-flood-limit2): Removed.
+ * erc.el (erc-mode-map):
+ * erc.el (erc-server-buffer):
+ * erc.el (erc-server-buffer-live-p):
+ * erc.el (erc-ison-p):
+ * erc.el (erc-mode):
+ * erc.el (erc-generate-new-buffer-name):
+ * erc.el (erc-with-buffer):
+ * erc.el (erc-buffer-filter):
+ * erc.el (erc-buffer-list):
+ * erc.el (erc-iswitchb):
+ * erc.el (current-nick): Removed.
+ * erc.el (channel-user-limit): Removed.
+ * erc.el (erc-channel-user-limit): New.
+ * erc.el (channel-key): Removed.
+ * erc.el (erc-channel-key): New.
+ * erc.el (last-peers): Removed.
+ * erc.el (invitation): Removed.
+ * erc.el (erc-invitation): New.
+ * erc.el (away): Removed.
+ * erc.el (erc-away): New.
+ * erc.el (channel-list): Removed.
+ * erc.el (erc-channel-list): New.
+ * erc.el (last-sent-time): Removed.
+ * erc.el (last-ping-time): Removed.
+ * erc.el (erc-modules):
+ * erc.el (last-ctcp-time): Removed.
+ * erc.el (erc-lines-sent): Removed.
+ * erc.el (erc-bytes-sent): Removed.
+ * erc.el (quitting): Removed.
+ * erc.el (bad-nick): Removed.
+ * erc.el (erc-bad-nick): New.
+ * erc.el (erc):
+ * erc.el (erc-previous-read): Removed.
+ * erc.el (erc-select-read-args):
+ * erc.el (erc-select-ssl):
+ * erc.el (erc-connect-function): Removed.
+ * erc.el (erc-connect): Removed.
+ * erc.el (erc-log-irc-protocol):
+ * erc.el (erc-split-multiline): Removed.
+ * erc.el (erc-toggle-debug-irc-protocol):
+ * erc.el (erc-process-filter): Removed.
+ * erc.el (erc-send-action):
+ * erc.el (erc-process-sentinel-1): Removed.
+ * erc.el (erc-display-line-1):
+ * erc.el (erc-process-sentinel): Removed.
+ * erc.el (erc-flood-exceeded-p): Removed.
+ * erc.el (erc-send-command): Removed.
+ * erc.el (erc-display-line):
+ * erc.el (erc-default-coding-system): Removed.
+ * erc.el (erc-encoding-coding-alist): Removed.
+ * erc.el (erc-send-input-line):
+ * erc.el (erc-coding-system-for-target): Removed.
+ * erc.el (erc-encode-string-for-target): Removed.
+ * erc.el (erc-decode-string-from-target): Removed.
+ * erc.el (erc-split-command): Removed.
+ * erc.el (erc-process-input-line):
+ * erc.el (erc-upcase-first-word): Removed.
+ * erc.el (erc-send-ctcp-message): Removed.
+ * erc.el (erc-send-ctcp-notice): Removed.
+ * erc.el (erc-cmd-default):
+ * erc.el (erc-cmd-UNIGNORE):
+ * erc.el (erc-cmd-OPS):
+ * erc.el (erc-cmd-AWAY):
+ * erc.el (erc-cmd-JOIN):
+ * erc.el (erc-cmd-NAMES):
+ * erc.el (erc-cmd-KICK):
+ * erc.el (erc-cmd-WHOIS):
+ * erc.el (erc-send-message):
+ * erc.el (erc-message): Removed.
+ * erc.el (erc-cmd-MODE):
+ * erc.el (erc-cmd-NICK):
+ * erc.el (erc-cmd-PART):
+ * erc.el (erc-cmd-QUOTE):
+ * erc.el (erc-cmd-QUIT):
+ * erc.el (erc-cmd-BYE):
+ * erc.el (erc-kill-queries-on-quit): Removed.
+ * erc.el (erc-cmd-SV):
+ * erc.el (erc-cmd-DEOP):
+ * erc.el (erc-cmd-OP):
+ * erc.el (erc-cmd-TIME):
+ * erc.el (erc-cmd-TOPIC):
+ * erc.el (erc-cmd-APPENDTOPIC):
+ * erc.el (erc-cmd-CLEARTOPIC):
+ * erc.el (channel-banlist): Removed.
+ * erc.el (erc-channel-banlist): New.
+ * erc.el (erc-cmd-BANLIST):
+ * erc.el (erc-cmd-MASSUNBAN):
+ * erc.el (erc-display-prompt):
+ * erc.el (erc-input-message):
+ * erc.el (erc-join-channel):
+ * erc.el (erc-set-topic):
+ * erc.el (erc-set-channel-limit):
+ * erc.el (erc-set-channel-key):
+ * erc.el (erc-quit-server):
+ * erc.el (erc-query):
+ * erc.el (erc-duplicates): Removed.
+ * erc.el (erc-duplicate-timeout): Removed.
+ * erc.el (erc-prevent-duplicates): Removed.
+ * erc.el (erc-nickname-in-use):
+ * erc.el (erc-server-hooks):
+ * erc.el (erc-auto-query):
+ * erc.el (erc-lag): Removed.
+ * erc.el (erc-send-ping-interval): Removed.
+ * erc.el (erc-ping-handler): Removed.
+ * erc.el (erc-setup-periodical-server-ping): Removed.
+ * erc.el (erc-echo-notice-in-user-buffers):
+ * erc.el (erc-echo-notice-in-user-and-target-buffers):
+ * erc.el (erc-echo-notice-in-first-user-buffer):
+ * erc.el (erc-server-version): Removed.
+ * erc.el (erc-banlist-store):
+ * erc.el (erc-banlist-finished):
+ * erc.el (erc-banlist-update):
+ * erc.el (erc-connection-established):
+ * erc.el (erc-set-initial-user-mode):
+ * erc.el (erc-ctcp-query-FINGER):
+ * erc.el (erc-process-away):
+ * erc.el (erc-update-channel-topic):
+ * erc.el (erc-set-modes):
+ * erc.el (erc-update-modes):
+ * erc.el (erc-update-channel-limit):
+ * erc.el (erc-update-channel-key):
+ * erc.el (erc-handle-user-status-change):
+ * erc.el (erc-send-current-line):
+ * erc.el (erc-send-input):
+ * erc.el (erc-display-command):
+ * erc.el (erc-send-single-line): Removed.
+ * erc.el (erc-display-msg):
+ * erc.el (erc-set-current-nick):
+ * erc.el (erc-current-nick):
+ * erc.el (erc-add-default-channel):
+ * erc.el (erc-ignored-reply-p):
+ * erc.el (with-erc-channel-buffer): Removed.
+ * erc.el (erc-toggle-flood-control):
+ * erc.el (erc-toggle-channel-mode):
+ * erc.el (erc-login):
+ * erc.el (erc-determine-parameters):
+ * erc.el (erc-away-p):
+ * erc.el (erc-mode-line-format):
+ * erc.el (erc-format-target):
+ * erc.el (erc-format-target-and/or-server):
+ * erc.el (erc-format-away-status):
+ * erc.el (erc-format-channel-modes):
+ * erc.el (erc-update-mode-line-buffer):
+ * erc.el (erc-arrange-session-in-multiple-windows):
+ * erc.el (erc-process-alive):
+ * erc.el (erc-kill-server):
+ * erc.el (erc-kill-channel):
+ * servers.pl:
+
+2005-10-15 Adrian Aichner <adrian(a)xemacs.org>
+
+ * AUTHORS:
+ * CREDITS:
+ * ChangeLog.2002.upstream:
+ * ChangeLog.2004.upstream:
+ * ChangeLog.upstream:
+ * Makefile (AUTHOR_VERSION):
+ * Makefile.upstream:
+ * NEWS:
+ * erc-autoaway.el:
+ * erc-autoaway.el (erc-autoaway-version):
+ * erc-autoaway.el (defvar):
+ * erc-autoaway.el (erc-autoaway-message):
+ * erc-autojoin.el:
+ * erc-autojoin.el (erc-autojoin-version):
+ * erc-autojoin.el (erc-autojoin-channels):
+ * erc-autojoin.el (erc-autojoin-add):
+ * erc-autojoin.el (erc-autojoin-remove):
+ * erc-backend.el:
+ * erc-backend.el (erc-server-current-nick): New.
+ * erc-backend.el (erc-server-process): New.
+ * erc-backend.el (erc-session-server): New.
+ * erc-backend.el (erc-session-port): New.
+ * erc-backend.el (erc-server-announced-name): New.
+ * erc-backend.el (erc-server-parameters): New.
+ * erc-backend.el (erc-server-connected): New.
+ * erc-backend.el (erc-server-quitting): New.
+ * erc-backend.el (erc-server-lines-sent): New.
+ * erc-backend.el (erc-server-last-peers): New.
+ * erc-backend.el (erc-server-last-sent-time): New.
+ * erc-backend.el (erc-server-last-ping-time): New.
+ * erc-backend.el (erc-server-lag): New.
+ * erc-backend.el (erc-server-filter-data): New.
+ * erc-backend.el (erc-server-duplicates): New.
+ * erc-backend.el (erc-server-processing-p): New.
+ * erc-backend.el (erc-server-flood-last-message): New.
+ * erc-backend.el (erc-server-flood-queue): New.
+ * erc-backend.el (erc-server-flood-timer): New.
+ * erc-backend.el (erc-server): New.
+ * erc-backend.el (erc-server-auto-reconnect): New.
+ * erc-backend.el (erc-split-line-length): New.
+ * erc-backend.el (erc-server-coding-system): New.
+ * erc-backend.el (erc-encoding-coding-alist): New.
+ * erc-backend.el (erc-server-connect-function): New.
+ * erc-backend.el (erc-server-prevent-duplicates): New.
+ * erc-backend.el (erc-server-duplicate-timeout): New.
+ * erc-backend.el (erc-server-flood-margin): New.
+ * erc-backend.el (erc-server-flood-penalty): New.
+ * erc-backend.el (erc-server-send-ping-interval): New.
+ * erc-backend.el (erc-server-ping-handler): New.
+ * erc-backend.el (erc-split-line): New.
+ * erc-backend.el (erc-upcase-first-word): New.
+ * erc-backend.el (erc-server-setup-periodical-server-ping): New.
+ * erc-backend.el (erc-server-connect): New.
+ * erc-backend.el (erc-server-filter-function): New.
+ * erc-backend.el (erc-process-sentinel-1): New.
+ * erc-backend.el (erc-process-sentinel): New.
+ * erc-backend.el (erc-coding-system-for-target): New.
+ * erc-backend.el (erc-decode-string-from-target): New.
+ * erc-backend.el (erc-send-line): New.
+ * erc-backend.el (erc-server-send): New.
+ * erc-backend.el (erc-server-send-queue): New.
+ * erc-backend.el (erc-message): New.
+ * erc-backend.el (erc-send-ctcp-message): New.
+ * erc-backend.el (erc-send-ctcp-notice): New.
+ * erc-backend.el (erc-decode-parsed-server-response):
+ * erc-backend.el (erc-handle-parsed-server-response):
+ * erc-backend.el (erc-handle-unknown-server-response):
+ * erc-backend.el (INVITE):
+ * erc-backend.el (JOIN):
+ * erc-backend.el (PING):
+ * erc-backend.el (PONG):
+ * erc-backend.el (PRIVMSG):
+ * erc-backend.el (001):
+ * erc-backend.el (MOTD):
+ * erc-backend.el (004):
+ * erc-backend.el (252):
+ * erc-backend.el (321):
+ * erc-backend.el (322):
+ * erc-backend.el (352):
+ * erc-backend.el (401):
+ * erc-bbdb.el:
+ * erc-bbdb.el (erc-bbdb-version):
+ * erc-bbdb.el (erc-bbdb-irc-highlight-field):
+ * erc-bbdb.el (erc-bbdb-bitlbee-name-field): New.
+ * erc-bbdb.el (erc-bbdb-search-name-and-create):
+ * erc-bbdb.el (erc-bbdb-insinuate-and-show-entry):
+ * erc-bbdb.el (erc-bbdb-whois):
+ * erc-bbdb.el (erc-bbdb-JOIN):
+ * erc-bbdb.el (erc-bbdb-NICK):
+ * erc-button.el:
+ * erc-button.el (erc-button-version):
+ * erc-chess.el:
+ * erc-chess.el (erc-chess-version):
+ * erc-chess.el (erc-chess-handler):
+ * erc-chess.el (erc-chess-engine-create):
+ * erc-compat.el:
+ * erc-compat.el (erc-compat-version):
+ * erc-compat.el (not):
+ * erc-compat.el (erc-view-mode-enter):
+ * erc-compat.el ('erc-view-mode-enter): New.
+ * erc-complete.el:
+ * erc-complete.el (erc-complete-version):
+ * erc-complete.el (erc-nick-completion-exclude-myself):
+ * erc-complete.el (erc-try-complete-nick):
2005-06-05 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 0.17 released.
1.2 +21 -21 XEmacs/packages/xemacs-packages/erc/ChangeLog.2002.upstream
Index: ChangeLog.2002.upstream
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/ChangeLog.2002.upstream,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- ChangeLog.2002.upstream 2005/04/10 14:47:32 1.1
+++ ChangeLog.2002.upstream 2005/10/15 18:15:26 1.2
@@ -1364,12 +1364,12 @@
* debian/rules 1.10: Use $(wildcard *.el) instead of a hardcoded list
-2002-07-03 Diane Murray <dsm(a)muenster.de>
+2002-07-03 Diane Murray <disumu(a)x3y2z1.net>
* erc.el 1.292:
erc-iswitchb now works correctly if erc-modified-channels-alist is non-nil
-2002-07-01 Diane Murray <dsm(a)muenster.de>
+2002-07-01 Diane Murray <disumu(a)x3y2z1.net>
* erc-menu.el 1.8:
* changed how we check if we should activate "Track hidden channels" and
@@ -1413,7 +1413,7 @@
Make /set anonymous-lign set erc-anonymous-login, also report
which var was set to which val.
-2002-06-28 Diane Murray <dsm(a)muenster.de>
+2002-06-28 Diane Murray <disumu(a)x3y2z1.net>
* erc-menu.el 1.6: added "Customize ERC"
@@ -1425,7 +1425,7 @@
(by rw)
Delete (erc-display-prompt) from reconnect to avoid clutter
-2002-06-23 Diane Murray <dsm(a)muenster.de>
+2002-06-23 Diane Murray <disumu(a)x3y2z1.net>
* erc.el 1.288:
erc-get-channel-mode-from-keypress is now bound to C-c C-m
@@ -1436,13 +1436,13 @@
* erc-track.el 1.15:
Fixed bug where buffer-names suddenly had text-properties.
-2002-06-19 Diane Murray <dsm(a)muenster.de>
+2002-06-19 Diane Murray <disumu(a)x3y2z1.net>
* Makefile 1.5: changed erc-auto.el to $(SPECIAL) in make fullclean
* Makefile 1.4: remove erc-auto.el on make fullclean
-2002-06-18 Diane Murray <dsm(a)muenster.de>
+2002-06-18 Diane Murray <disumu(a)x3y2z1.net>
* erc-match.el 1.10: fixed spelling error
@@ -1454,14 +1454,14 @@
* erc-track.el:
added support for erc-current-nick-face
-2002-06-17 Diane Murray <dsm(a)muenster.de>
+2002-06-17 Diane Murray <disumu(a)x3y2z1.net>
* erc.el 1.287: * added beginning suport for 005 numerics:
- added buffer local variable erc-server-parameters
- added erc-server-005, which sets erc-server-parameters if the server has
used this code to show its parameters
-2002-06-16 Diane Murray <dsm(a)muenster.de>
+2002-06-16 Diane Murray <disumu(a)x3y2z1.net>
* erc.el 1.286:
* bugfix: when pasting lines with blank lines in between, remove the blank lines
@@ -1481,7 +1481,7 @@
* erc-nickserv.el 1.4 (erc-networks): Added doc string.
(erc-nickserv-alist): Added doc string.
-2002-06-14 Diane Murray <dsm(a)muenster.de>
+2002-06-14 Diane Murray <disumu(a)x3y2z1.net>
* erc-ring.el 1.4:
fixed bug so that the prompt and command always get put at the end of the buffer
@@ -1492,7 +1492,7 @@
Added :type for erc-nickserv-passwords custom.
Fixed hook usage.
-2002-06-07 Diane Murray <dsm(a)muenster.de>
+2002-06-07 Diane Murray <disumu(a)x3y2z1.net>
* erc-nickserv.el 1.2: * added GalaxyNet
@@ -1518,7 +1518,7 @@
* erc.el 1.284: Added /squery command
-2002-06-06 Diane Murray <dsm(a)muenster.de>
+2002-06-06 Diane Murray <disumu(a)x3y2z1.net>
* erc-menu.el 1.5: * made group Channel modes
- moved change mode and invite only mode to here
@@ -1557,7 +1557,7 @@
* erc-match.el: Fixed a stupid mistake where
"*** Your new nick is <foo>" would trigger an error.
-2002-06-04 Diane Murray <dsm(a)muenster.de>
+2002-06-04 Diane Murray <disumu(a)x3y2z1.net>
* erc-nickserv.el 1.1, erc.el 1.282: * added erc-nickserv.el
* moved nickserv identification variables and functions to the new file
@@ -1615,14 +1615,14 @@
* fixed bug where nil was shown if no reason was given by users on /PART
-2002-06-03 Diane Murray <dsm(a)muenster.de>
+2002-06-03 Diane Murray <disumu(a)x3y2z1.net>
* erc-match.el 1.7:
* fixed bug where erc-log-matches produced an error when the value of
(erc-default-target) was not a channel
* use erc-format-timestamp, if it's non-nil, for %t in erc-log-match-format
-2002-06-01 Diane Murray <dsm(a)muenster.de>
+2002-06-01 Diane Murray <disumu(a)x3y2z1.net>
* erc-button.el 1.18:
* made action case insensitive in erc-nick-popup and added a more descriptive
@@ -1655,7 +1655,7 @@
erc-track.el: erc-track-exclude-types: New variable. Defaults to ("JOIN"
"PART") right now for testing, it should eventually set to nil soon again.
(erc-track-modified-channels): Use above fun and var to optionally exclude certain
message types from channel tracking.
-2002-05-28 Diane Murray <dsm(a)muenster.de>
+2002-05-28 Diane Murray <disumu(a)x3y2z1.net>
* CREDITS 1.5: added myself, vain as it sounds ;)
@@ -1709,7 +1709,7 @@
* erc-nets.el 1.3: Added some old code I once worked on.
Added autoload cookie
-2002-05-24 Diane Murray <dsm(a)muenster.de>
+2002-05-24 Diane Murray <disumu(a)x3y2z1.net>
* erc-fill.el 1.10:
removed reference in documentation to old variable, changed it to the new one
@@ -1732,11 +1732,11 @@
- new function erc-set-initial-user-mode gets called from
erc-connection-established
-2002-05-22 Diane Murray <dsm(a)muenster.de>
+2002-05-22 Diane Murray <disumu(a)x3y2z1.net>
* erc.el 1.270: fixed bug where prompt was missing after reconnect
-2002-05-21 Diane Murray <dsm(a)muenster.de>
+2002-05-21 Diane Murray <disumu(a)x3y2z1.net>
* erc.el 1.269:
in erc-nickserv-identify: if network is unknown, just use "Nickserv"
@@ -1769,7 +1769,7 @@
require NickServ(a)services.dal.net
now sends to all NickServ with nick@server where possible
-2002-05-17 Diane Murray <dsm(a)muenster.de>
+2002-05-17 Diane Murray <disumu(a)x3y2z1.net>
* erc-fill.el 1.9:
* filling with erc-fill-variable now works with custom defined fill width:
@@ -1788,7 +1788,7 @@
* erc.el 1.264: whitespace fix
-2002-05-15 Diane Murray <dsm(a)muenster.de>
+2002-05-15 Diane Murray <disumu(a)x3y2z1.net>
* erc.el 1.263:
* added explanation of empty string working in erc-quit-reason-various-alist
@@ -1798,7 +1798,7 @@
"/ctcp nick time" and not just "/ctcp nick TIME"
* timestamp in front of server notices now shown in the timestamp face
-2002-05-13 Diane Murray <dsm(a)muenster.de>
+2002-05-13 Diane Murray <disumu(a)x3y2z1.net>
* erc.el 1.262:
- in erc-format-privmessage: `erc-format-timestamp' added to message after
1.2 +63 -63 XEmacs/packages/xemacs-packages/erc/ChangeLog.2004.upstream
Index: ChangeLog.2004.upstream
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/ChangeLog.2004.upstream,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- ChangeLog.2004.upstream 2005/04/10 14:47:33 1.1
+++ ChangeLog.2004.upstream 2005/10/15 18:15:26 1.2
@@ -85,7 +85,7 @@
(smiley): Module moved from erc.el to erc-goodies.el.
(scrolltobottom, readonly, noncommands, unmorse): New modules.
-2004-12-20 Diane Murray <dsm(a)muenster.de>
+2004-12-20 Diane Murray <disumu(a)x3y2z1.net>
* erc.el: (erc-format-away-status): Use `a', not `away' - that's
why it's there.
@@ -121,19 +121,19 @@
and not the entire message. Revision 1.707 had broken /me.
Shouting is bad! :)
-2004-12-14 Diane Murray <dsm(a)muenster.de>
+2004-12-14 Diane Murray <disumu(a)x3y2z1.net>
* erc-nets.el (erc-networks-alist): Change undernet to Undernet as
is used in `erc-server-alist', so that completion works when using
`erc-server-select'. This should fix Debian bug #282003 (erc:
cannot connect to Undernet).
-2004-12-14 Diane Murray <dsm(a)muenster.de>
+2004-12-14 Diane Murray <disumu(a)x3y2z1.net>
* erc-backend.el: (def-edebug-spec): Only run this if 'edebug is
available.
-2004-12-14 Diane Murray <dsm(a)muenster.de>
+2004-12-14 Diane Murray <disumu(a)x3y2z1.net>
* erc.el: The last change to `erc-mode-line-format' introduced a
bug in Xemacs - it can't handle the #(" "...) strings at all. The
@@ -154,13 +154,13 @@
(if it is bound) to the formatted `erc-header-line-format', then
do a `force-mode-line-update'.
-2004-12-12 Diane Murray <dsm(a)muenster.de>
+2004-12-12 Diane Murray <disumu(a)x3y2z1.net>
* erc.el (erc-modules): Disable modules removed with `customize'.
(erc-update-modules): Try to give a more descriptive error
message.
-2004-12-12 Diane Murray <dsm(a)muenster.de>
+2004-12-12 Diane Murray <disumu(a)x3y2z1.net>
* erc-complete.el, erc.el, erc-list.el, erc-nets.el,
erc-nicklist.el, erc-pcomplete.el, erc-replace.el, erc-speak.el,
@@ -227,12 +227,12 @@
invocation, so erc-iswitchb can be substituted directly for
iswitchb in code.
-2004-12-11 Diane Murray <dsm(a)muenster.de>
+2004-12-11 Diane Murray <disumu(a)x3y2z1.net>
* erc-track.el (erc-track-position-in-mode-line): Allow for the
fact that `erc-track-mode' isn't bound when file is loaded.
-2004-12-11 Diane Murray <dsm(a)muenster.de>
+2004-12-11 Diane Murray <disumu(a)x3y2z1.net>
* erc-track.el (erc-track-position-in-mode-line): New customizable
variable. (erc-track-remove-from-mode-line): New function.
@@ -275,7 +275,7 @@
* Makefile, debian/changelog: debian release 20041118-1
-2004-11-03 Diane Murray <dsm(a)muenster.de>
+2004-11-03 Diane Murray <disumu(a)x3y2z1.net>
* erc-button.el (erc-button-buttonize-nicks): Set default value to
`t'. Updated documentation and customization `:type' to reflect
@@ -285,7 +285,7 @@
* AUTHORS: Added self.
-2004-10-17 Diane Murray <dsm(a)muenster.de>
+2004-10-17 Diane Murray <disumu(a)x3y2z1.net>
* erc-list.el: Added local variables for this file.
(erc-list-version): New.
@@ -294,7 +294,7 @@
(erc-prettify-channel-list, erc-chanlist-toggle-sort-state): Use
`unless' instead of when not.
-2004-10-17 Diane Murray <dsm(a)muenster.de>
+2004-10-17 Diane Murray <disumu(a)x3y2z1.net>
* erc-backend.el (erc-handle-unknown-server-response): Fixed so
that the contents are only shown once. (MOTD): Display lines in
@@ -309,7 +309,7 @@
documentation. Use `multiple-value-bind' to set variables in 367.
(391): Fixed so that the server name is shown correctly.
-2004-10-17 Diane Murray <dsm(a)muenster.de>
+2004-10-17 Diane Murray <disumu(a)x3y2z1.net>
* erc.el (erc-process-sentinel): Use CPROC instead of
`erc-process' in debug message. Should fix a bug where an error
@@ -789,7 +789,7 @@
* HACKING: Add comment that C-c C-a can be useful if you write
ChangeLog entries using Emacs' standard functions.
-2004-05-17 Diane Murray <dsm(a)muenster.de>
+2004-05-17 Diane Murray <disumu(a)x3y2z1.net>
* erc-speedbar.el: Ignore errors when attempting to require dframe
(there are a couple implementations of speedbar, one of which uses
@@ -798,7 +798,7 @@
(erc-speedbar-goto-buffer): Use dframe functions if dframe is
available.
-2004-05-17 Diane Murray <dsm(a)muenster.de>
+2004-05-17 Diane Murray <disumu(a)x3y2z1.net>
* erc-autojoin.el: Added local variables for this file.
(erc-autojoin-add): The channel name is in `erc-response.contents'.
@@ -814,7 +814,7 @@
`erc-parse-line-from-server' version, since new version breaks for
a number of edge cases.
-2004-05-14 Diane Murray <dsm(a)muenster.de>
+2004-05-14 Diane Murray <disumu(a)x3y2z1.net>
* erc-backend.el (erc-handle-unknown-server-response): New
function. Added to `erc-default-server-functions'. Display
@@ -828,7 +828,7 @@
(431, 445, 446, 451, 462, 463, 464, 465, 481, 483, 485, 491, 501,
502): All error responsess with no arguments grouped together.
-2004-05-14 Diane Murray <dsm(a)muenster.de>
+2004-05-14 Diane Murray <disumu(a)x3y2z1.net>
* erc.el (erc-message-type-member): Use `erc-response.command'.
`erc-track-exclude-types' should be respected again.
@@ -854,7 +854,7 @@
it.
(461): Command with invalid arguments is `second', not `third'.
-2004-05-14 Diane Murray <dsm(a)muenster.de>
+2004-05-14 Diane Murray <disumu(a)x3y2z1.net>
* erc-notify.el (erc-notify-NICK): Use `erc-response.contents' to
get nickname.
@@ -1027,7 +1027,7 @@
(483, 491, 502, 005, KILL): Move from erc.el and rework using
`define-erc-response-handler' and erc-response struct.
-2004-05-12 Diane Murray <dsm(a)muenster.de>
+2004-05-12 Diane Murray <disumu(a)x3y2z1.net>
* erc.el: A few bug fixes to avoid errors after disconnect,
including the "Selecting deleted buffer" bug.
@@ -1042,7 +1042,7 @@
(erc-send-current-line): If there is no server buffer, let the
user know.
-2004-05-12 Diane Murray <dsm(a)muenster.de>
+2004-05-12 Diane Murray <disumu(a)x3y2z1.net>
* erc.el, erc-log.el: C-c C-l keybinding now defined in
erc-log.el.
@@ -1050,19 +1050,19 @@
(erc-cmd-JOIN): Fix applied for bug where /join -invite causes
errors when there's no `invitation'.
-2004-05-11 Diane Murray <dsm(a)muenster.de>
+2004-05-11 Diane Murray <disumu(a)x3y2z1.net>
* erc.el: (erc-cmd-JOIN): Make sure `chnl' is non-nil before trying
to join anything (chnl is not set if /join -invite is used but
there's no `invitation').
-2004-05-10 Diane Murray <dsm(a)muenster.de>
+2004-05-10 Diane Murray <disumu(a)x3y2z1.net>
* erc-log.el: Define C-c C-l keybinding outside of `erc-log-mode',
making it available all the time; autoload definition.
(erc-log-version): New.
-2004-05-09 Diane Murray <dsm(a)muenster.de>
+2004-05-09 Diane Murray <disumu(a)x3y2z1.net>
* AUTHORS, CREDITS, Makefile, erc-autoaway.el, erc-autojoin.el,
erc-button.el, erc-chess.el, erc-dcc.el, erc-ezbounce.el,
@@ -1074,7 +1074,7 @@
erc-xdcc.el, erc.el: Applied all relevant bug fixes and code
cleanup made between the time of the ERC_4_0_RELEASE tag until now.
-2004-05-09 Diane Murray <dsm(a)muenster.de>
+2004-05-09 Diane Murray <disumu(a)x3y2z1.net>
* erc-menu.el: Updated copyright years.
@@ -1105,7 +1105,7 @@
reference to erc-save-queries-on-quit.
(erc-conditional-save-queries): Ditto.
-2004-05-06 Diane Murray <dsm(a)muenster.de>
+2004-05-06 Diane Murray <disumu(a)x3y2z1.net>
* erc-speedbar.el: Updated copyright years. Added local variables
for this file; fixed indenting.
@@ -1121,7 +1121,7 @@
(erc-speedbar-goto-buffer): Don't use dframe functions, as dframe
isn't available with the default speedbar.
-2004-05-06 Diane Murray <dsm(a)muenster.de>
+2004-05-06 Diane Murray <disumu(a)x3y2z1.net>
* erc.el: (erc-sort-channel-users-alphabetically): New function.
(erc-server-412, erc-server-432, erc-server-475): New functions.
@@ -1133,7 +1133,7 @@
(erc-define-catalog): Added s401, s403, s405, s412, s421, s432,
s474, s475, and s481.
-2004-05-06 Diane Murray <dsm(a)muenster.de>
+2004-05-06 Diane Murray <disumu(a)x3y2z1.net>
* erc-nickserv.el: Added documentation to Commentary, Usage.
Removed `outline-mode' from file local variables.
@@ -1151,7 +1151,7 @@
(erc-nickserv-identify): PASSWORD is not optional. Autoload
function.
-2004-05-05 Diane Murray <dsm(a)muenster.de>
+2004-05-05 Diane Murray <disumu(a)x3y2z1.net>
* erc.el (erc-join-hook, erc-quit-hook, erc-part-hook,
erc-kick-hook, erc-connect-pre-hook): Now customizable.
@@ -1171,7 +1171,7 @@
* erc.el (erc-wash-quit-reason): Quote regexp special characters
in NICK, LOGIN and HOST.
-2004-05-04 Diane Murray <dsm(a)muenster.de>
+2004-05-04 Diane Murray <disumu(a)x3y2z1.net>
* erc.el (erc-server-parameters): Typo fix in docstring.
(erc-input-line-position): `:type' is now a choice between integer
@@ -1183,7 +1183,7 @@
* erc-nicklist.el: Initial version.
-2004-04-28 Diane Murray <dsm(a)muenster.de>
+2004-04-28 Diane Murray <disumu(a)x3y2z1.net>
* erc-menu.el: Added local variables for file, fixed indenting.
(erc-menu-version): New variable.
@@ -1194,13 +1194,13 @@
down. "Track hidden channel buffers": Removed. "Enable/Disable
ERC Modules": New.
-2004-04-28 Diane Murray <dsm(a)muenster.de>
+2004-04-28 Diane Murray <disumu(a)x3y2z1.net>
* erc.el (erc-mode-map): Removed binding for
`erc-save-buffer-in-logs' (moved to erc-log.el).
(erc-cmd-QUERY, erc-cmd-OPS): Now interactive.
-2004-04-28 Diane Murray <dsm(a)muenster.de>
+2004-04-28 Diane Murray <disumu(a)x3y2z1.net>
* erc-log.el: Added local variables for this file.
(erc-log-channels-directory): Added directory as a choice in
@@ -1208,13 +1208,13 @@
(define-erc-module): Define and undefine key binding (C-c
C-l) for `erc-save-buffer-in-logs' here.
-2004-04-28 Diane Murray <dsm(a)muenster.de>
+2004-04-28 Diane Murray <disumu(a)x3y2z1.net>
* erc-nets.el: Added local variables for this file.
(erc-networks-alist): Fixed `:type' to work better in
customization.
-2004-04-28 Diane Murray <dsm(a)muenster.de>
+2004-04-28 Diane Murray <disumu(a)x3y2z1.net>
* erc-match.el: Added local variables for file. (erc-keywords):
Use `list' instead of `cons' in `:type'. Fixes bug where mismatch
@@ -1222,14 +1222,14 @@
Escape parentheses in docstring. Added keyword, nick-or-keyword as
options in `:type'.
-2004-04-28 Diane Murray <dsm(a)muenster.de>
+2004-04-28 Diane Murray <disumu(a)x3y2z1.net>
* erc-stamp.el: Added local variables for file.
(erc-away-timestamp-format): Allow nil as a choice in `:type'.
(erc-timestamp-intangible): Changed `:type' to boolean.
(erc-timestamp-right-column): Added `:group' and `:type'.
-2004-04-28 Diane Murray <dsm(a)muenster.de>
+2004-04-28 Diane Murray <disumu(a)x3y2z1.net>
* erc.el (erc-modules): Added bbdb, log, match, sound, and stamp
as `:type' options; changed documentation for autojoin, fill,
@@ -1248,7 +1248,7 @@
(erc-log-matches-types-alist): Added `current-nick' to valid
choices.
-2004-04-20 Diane Murray <dsm(a)muenster.de>
+2004-04-20 Diane Murray <disumu(a)x3y2z1.net>
* erc-page.el, erc-ezbounce.el, erc-speak.el, erc-match.el,
erc-track.el (erc-ezbounce, erc-page, erc-speak): Groups defined.
@@ -1270,7 +1270,7 @@
and erc-insert-timestamp-function set to
'erc-insert-timestamp-left, but otherwise it works now.
-2004-04-20 Diane Murray <dsm(a)muenster.de>
+2004-04-20 Diane Murray <disumu(a)x3y2z1.net>
* erc.el: (erc-cmd-SV): Show features gtk, mac-carbon, multi-tty.
Fixed so that arguments fit the format (build date was not being
@@ -1283,7 +1283,7 @@
(erc-update-mode-line-buffer): Escape %-signs in `channel-topic'
here.
-2004-04-19 Diane Murray <dsm(a)muenster.de>
+2004-04-19 Diane Murray <disumu(a)x3y2z1.net>
* erc.el: (erc-send-action, erc-ctcp-query-ACTION,
erc-ctcp-reply-ECHO-hook): Let `erc-display-message-highlight'
@@ -1303,7 +1303,7 @@
(erc-server-477-hook): Use `erc-server-477'.
(erc-define-catalog): Added `no-invitation'.
-2004-04-14 Diane Murray <dsm(a)muenster.de>
+2004-04-14 Diane Murray <disumu(a)x3y2z1.net>
* erc-nickserv.el: Local variables for file added.
(erc-nickserv-passwords): Customization: Network symbols updated
@@ -1311,12 +1311,12 @@
symbol.
(erc-nickserv-alist): Now customizable variable.
-2004-04-09 Diane Murray <dsm(a)muenster.de>
+2004-04-09 Diane Murray <disumu(a)x3y2z1.net>
* erc-autoaway.el (erc-autoaway-reset-idletime): Make sure `line'
is a string to avoid errors upon startup.
-2004-04-06 Diane Murray <dsm(a)muenster.de>
+2004-04-06 Diane Murray <disumu(a)x3y2z1.net>
* erc-autoaway.el (erc-autoaway-version): New variable.
(erc-auto-discard-away): Updated docstring.
@@ -1325,12 +1325,12 @@
which allows for aliases to "/away" and any other text that the
user wants to ignore when `erc-auto-discard-away' is non-nil.
-2004-04-06 Diane Murray <dsm(a)muenster.de>
+2004-04-06 Diane Murray <disumu(a)x3y2z1.net>
* erc-autoaway.el (erc-autoaway-reset-idletime): Forgot /gaway in
regexp.
-2004-04-06 Diane Murray <dsm(a)muenster.de>
+2004-04-06 Diane Murray <disumu(a)x3y2z1.net>
* erc-autoaway.el (erc-autoaway-reset-idletime): If the user sends
an "/away" command, don't call `erc-autoaway-set-back', fixes bug
@@ -1339,13 +1339,13 @@
(erc-autoaway-set-back): Changed `l' to `line' for better
understanding.
-2004-04-05 Diane Murray <dsm(a)muenster.de>
+2004-04-05 Diane Murray <disumu(a)x3y2z1.net>
* erc.el (erc-set-channel-key): Now able to remove key.
(erc-set-channel-limit): Now able to remove limit.
(erc-get-channel-mode-from-keypress): Fixed docstring.
-2004-04-04 Diane Murray <dsm(a)muenster.de>
+2004-04-04 Diane Murray <disumu(a)x3y2z1.net>
* erc.el (erc-join-channel): Allow for optional channel key.
(erc-set-modes): Need to set `channel-key' to nil in case of mode
@@ -1354,7 +1354,7 @@
(erc-prepare-mode-line-format): Only show key if
`erc-show-channel-key-p' is non-nil.
-2004-04-04 Diane Murray <dsm(a)muenster.de>
+2004-04-04 Diane Murray <disumu(a)x3y2z1.net>
* erc.el (channel-key): New variable.
(erc-update-channel-key): New function.
@@ -1405,12 +1405,12 @@
default behavior, is for `erc-echo-notice-always-hook' to be set to
`(erc-echo-notice-in-default-buffer).
-2004-03-21 Diane Murray <dsm(a)muenster.de>
+2004-03-21 Diane Murray <disumu(a)x3y2z1.net>
* erc-track.el: (erc-modified-channels-display): Added a space
before opening bracket.
-2004-03-21 Diane Murray <dsm(a)muenster.de>
+2004-03-21 Diane Murray <disumu(a)x3y2z1.net>
* erc.el: (erc-format-query-as-channel-p): New variable.
(erc-server-PRIVMSG-or-NOTICE): If `erc-format-query-as-channel-p'
@@ -1435,14 +1435,14 @@
(erc-server-001, erc-server-004, erc-server-005): Fixed
documentation.
-2004-03-20 Diane Murray <dsm(a)muenster.de>
+2004-03-20 Diane Murray <disumu(a)x3y2z1.net>
* erc-stamp.el: Commentary: Changed `erc-stamp-mode' to
`erc-timestamp-mode'.
(erc-insert-timestamp-left): Use `erc-timestamp-face' on filler
spaces as well.
-2004-03-19 Diane Murray <dsm(a)muenster.de>
+2004-03-19 Diane Murray <disumu(a)x3y2z1.net>
* erc.el (erc-send-action): Use `erc-input-face'.
(erc-display-message-highlight): If the requested highlighting
@@ -1522,7 +1522,7 @@
(erc-put-text-property): Ditto.
(erc-add-default-channel): Ditto.
-2004-03-17 Diane Murray <dsm(a)muenster.de>
+2004-03-17 Diane Murray <disumu(a)x3y2z1.net>
* erc.el (erc-process-sentinel): Cancel ping timer upon
disconnect.
@@ -1533,7 +1533,7 @@
(erc-part-reason-zippy, erc-part-reason-zippy): Removed FIXME
comments. I see no problem allowing typed in reasons.
-2004-03-16 Diane Murray <dsm(a)muenster.de>
+2004-03-16 Diane Murray <disumu(a)x3y2z1.net>
* erc-stamp.el: (erc-insert-timestamp-left): Added support for
`erc-timestamp-only-if-changed-flag' and added docstring.
@@ -1563,7 +1563,7 @@
* erc-nets.el: From Adrian Aichner (adrian /at/ xemacs /dot/ org)
* erc-nets.el: XEmacs make-obsolete only takes two arguments.
-2004-03-10 Diane Murray <dsm(a)muenster.de>
+2004-03-10 Diane Murray <disumu(a)x3y2z1.net>
* erc-nets.el (erc-determine-network): Use `erc-session-server' if
`erc-announced-server' is nil to avoid error if server does not
@@ -1603,18 +1603,18 @@
(erc-ports-list): Add docstring. Rework function body to use
`nconc'.
-2004-03-09 Diane Murray <dsm(a)muenster.de>
+2004-03-09 Diane Murray <disumu(a)x3y2z1.net>
* erc-list.el, erc-notify.el: (require 'erc-nets): added
-2004-03-08 Diane Murray <dsm(a)muenster.de>
+2004-03-08 Diane Murray <disumu(a)x3y2z1.net>
* erc.el (erc-network-name): Function definition moved to
erc-nets.el. The functions `erc-determine-network' and
`èrc-network' in erc-nets.el do what this did before. Deprecated.
Use (erc-network) instead.
-2004-03-08 Diane Murray <dsm(a)muenster.de>
+2004-03-08 Diane Murray <disumu(a)x3y2z1.net>
* erc-nickserv.el: Changed copyright notice. Now require
erc-nets. erc-nets.el now takes care of network-related functions
@@ -1631,7 +1631,7 @@
erc-nets.el do what this did before. Deprecated. Use
(erc-network) instead.
-2004-03-08 Diane Murray <dsm(a)muenster.de>
+2004-03-08 Diane Murray <disumu(a)x3y2z1.net>
* erc-nets.el: Added commentary, `erc-nets-version'.
(erc-server-alist): Changed Brasnet to BRASnet.
@@ -1656,7 +1656,7 @@
`erc-disconnected-hook'.
(erc-server-select): Small documentation word change.
-2004-03-07 Diane Murray <dsm(a)muenster.de>
+2004-03-07 Diane Murray <disumu(a)x3y2z1.net>
* AUTHORS, CREDITS: disumu info updated
@@ -1708,7 +1708,7 @@
we'll probably have to do the iteration ourselves instead of using
assoc.
-2004-03-05 Diane Murray <dsm(a)muenster.de>
+2004-03-05 Diane Murray <disumu(a)x3y2z1.net>
* erc.el: Added erc-server-001 which runs when the server sends
its welcome message. It sets the current-nick to reflect the
@@ -1740,26 +1740,26 @@
* HACKING: Initial commit. Some thoughts on coding standards.
-2004-03-03 Diane Murray <dsm(a)muenster.de>
+2004-03-03 Diane Murray <disumu(a)x3y2z1.net>
* erc-track.el: added the variable erc-track-priority-faces-only
which adds the option to ignore changes in a channel unless there
are faces from the erc-track-faces-priority-list in the message
options are nil, 'all, or a list of channel name strings
-2004-03-01 Diane Murray <dsm(a)muenster.de>
+2004-03-01 Diane Murray <disumu(a)x3y2z1.net>
* erc.el, erc-ibuffer.el, erc-menu.el: Changed erc-is-channel-op
and erc-is-channel-voice to erc-channel-user-op-p and
erc-channel-user-voice-p to better match erc-channel-user
structure (and emacs lisp usage)
-2004-03-01 Diane Murray <dsm(a)muenster.de>
+2004-03-01 Diane Murray <disumu(a)x3y2z1.net>
* erc.el, erc-ibuffer.el, erc-menu.el:
erc-track-modified-channels-mode is now erc-track-mode
-2004-02-29 Diane Murray <dsm(a)muenster.de>
+2004-02-29 Diane Murray <disumu(a)x3y2z1.net>
* erc-match.el: Added 'keyword option to
erc-current-nick-highlight-type highlights all instances of
1.8 +481 -17 XEmacs/packages/xemacs-packages/erc/ChangeLog.upstream
Index: ChangeLog.upstream
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/ChangeLog.upstream,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- ChangeLog.upstream 2005/06/05 15:47:01 1.7
+++ ChangeLog.upstream 2005/10/15 18:15:26 1.8
@@ -1,3 +1,467 @@
+2005-10-08 Diane Murray <disumu(a)x3y2z1.net>
+
+ * AUTHORS, CREDITS, ChangeLog, ChangeLog.2002, ChangeLog.2004:
+ Updated my email address.
+
+2005-10-06 Michael Olson <mwolson(a)gnu.org>
+
+ * erc.el (erc-send-input-line, erc-cmd-KICK, erc-cmd-PART)
+ (erc-cmd-QUIT, erc-cmd-TOPIC, erc-kill-server, erc-kill-channel):
+ Adapt to new TARGET parameter of erc-server-send.
+
+ * erc-backend.el (erc-server-connect): Don't specify encoding for
+ erc-server-process, since we set this each time we send a line to
+ the server.
+ (erc-encode-string-for-target): Remove.
+ (erc-server-send): Allow TARGET to be specified. This was how it
+ used to be before my more-backend work. Set encoding of server
+ process just before sending text to it. Associate encoding with
+ text if we are using the queue.
+ (erc-server-send-queue): Pull encoding from queue.
+ (erc-message, erc-send-ctcp-message, erc-send-ctcp-notice): Adapt
+ to new TARGET parameter of erc-server-send.
+
+2005-10-05 Michael Olson <mwolson(a)gnu.org>
+
+ * erc.el (erc-toggle-debug-irc-protocol): Use erc-view-mode-enter
+ rather than view-mode.
+
+ * erc-backend.el (erc-encode-string-for-target): If given a nil or
+ empty string, return "".
+ (erc-server-send-queue): XEmacs fix: Use erc-cancel-timer rather
+ than cancel-timer.
+
+ * erc-compat.el (erc-view-mode-enter): New function that is
+ aliased to the correct way of entering view-mode.
+
+ * erc-match.el (erc-log-matches-make-buffer): Use
+ erc-view-mode-enter rather than view-mode-enter.
+
+2005-10-05 Edward O'Connor <ted(a)oconnor.cx>
+
+ * erc-backend.el (erc-encode-string-for-target): If str is nil,
+ pass the empty string to erc-encode-coding-string instead, which
+ allows one to /part and /quit without providing a reason again.
+
+2005-10-03 Michael Olson <mwolson(a)gnu.org>
+
+ * erc-backend.el (erc-message, erc-send-ctcp-message)
+ (erc-send-ctcp-notice): Encode string for target before sending.
+
+ * erc.el (erc-cmd-KICK, erc-cmd-PART, erc-cmd-QUIT, erc-cmd-TOPIC)
+ (erc-kill-server, erc-kill-channel): Ditto.
+
+2005-09-05 Johan Bockgård <bojohan(a)users.sourceforge.net>
+
+ * erc-page.el (erc-ctcp-query-PAGE): (message text) -> (message
+ "%s" text).
+ (erc-cmd-PAGE): Simplify regexp. Put `do-not-parse-args' t.
+
+2005-09-05 Michael Olson <mwolson(a)gnu.org>
+
+ * erc.el (erc-flood-limit, erc-flood-limit2): Remove since they
+ are no longer needed.
+ (erc-send-input): Detect whether we want flood control to be
+ active. The previous behavior was to always force the message.
+ (erc-toggle-flood-control): Adapt to new flood control method. No
+ more 'strict.
+ (erc-cmd-SV): Use concat rather than
+ format-time-string.
+ (erc-format-target, erc-format-target-and/or-server): Shorten
+ logic statements.
+
+ * erc-compat.el (erc-emacs-build-time): Use a string
+ representation rather than trying to coerce a time out of a string
+ on XEmacs.
+
+ * erc-identd.el (erc-identd-start): Use make-network-process
+ instead of open-network-stream. Error out if this is not defined.
+
+ * erc-backend.el (erc-send-line): New command that sends a line
+ using flood control, using a callback for display. It isn't used
+ yet.
+
+2005-09-04 Michael Olson <mwolson(a)gnu.org>
+
+ * erc.el: Add defvaralias and make-obsolete-variable for
+ erc-default-coding-system.
+ (channel-topic, channel-modes, channel-user-limit, channel-key,
+ invitation, away, channel-list, bad-nick): Rename globally to
+ erc-{name-of-variable}.
+
+2005-09-03 Johan Bockgård <bojohan(a)users.sourceforge.net>
+
+ * erc.el (erc-message): Simplify regexp.
+ (erc-cmd-DEOP, erc-cmd-OP): Simplify.
+
+2005-08-29 Michael Olson <mwolson(a)gnu.org>
+
+ * erc.el: Alias erc-send-command to erc-server-send. ErBot needs
+ this to work without modification. Add defvaralias for
+ erc-process. Make this and the other backwards-compatibility
+ functions and variables be marked obsolete as of ERC 5.1.
+
+ * erc-backend.el: Add autoload for erc-log macro.
+ (erc-server-connect): Set some variables before defining process
+ handlers. It probably doesn't make any difference.
+
+2005-08-26 Michael Olson <mwolson(a)gnu.org>
+
+ * erc.el: Add defvaralias for erc-announced-server-name, since
+ this seems to be widely used.
+
+2005-08-17 Michael Olson <mwolson(a)gnu.org>
+
+ * erc.el (erc): Remove unnecessary boundp check.
+
+ * erc-autoaway.el: Fix compiler warning.
+
+ * erc-backend.el (erc-server-version): Since this isn't used by
+ any code, and isn't generally useful, remove it.
+ (erc-server-send-queue): Use erc-current-time rather than
+ float-time.
+ (004): Don't set erc-server-version.
+
+ * erc-dcc.el (erc-dcc-chat-request, erc-dcc-get-parent): Move to
+ fix a compiler warning.
+
+ * erc-ibuffer.el (erc-server): Remove unnecessary boundp check.
+
+ * erc-identd.el (erc-identd-start): Use read-string instead of
+ read-input.
+
+ * erc-imenu.el (erc-unfill-notice): Use a while loop instead of
+ replace-regexp.
+
+ * erc-nicklist.el: Add conditional dependency on erc-bbdb.
+ (erc-nicklist-insert-contents): Tighten some regexps.
+
+ * erc-notify.el (erc-notify-list): Docfix.
+
+ * erc-spelling.el (erc-spelling-dictionaries): Add :type and
+ :group to silence a compiler warning.
+
+2005-08-14 Michael Olson <mwolson(a)gnu.org>
+
+ * erc-backend.el (erc-session-server, erc-session-port)
+ (erc-announced-server-name, erc-server-version)
+ (erc-server-parameters): Moved here from erc.el.
+ (erc-server-last-peers): Moved, renamed from last-peers.
+ (erc-server-lag): Moved, renamed from erc-lag.
+ (erc-server-duplicates): Moved, renamed from erc-duplicates.
+ (erc-server-duplicate-timeout): Moved, renamed from
+ erc-duplicate-timeout.
+ (erc-server): New customization group hosting all options from
+ this file.
+ (erc-server-prevent-duplicates): Moved, renamed from
+ erc-prevent-duplicates.
+ (erc-server-duplicate-timeout): Moved, renamed from
+ erc-duplicate-timeout.
+ (erc-server-auto-reconnect, erc-split-line-length)
+ (erc-server-coding-system, erc-encoding-coding-alist)
+ (erc-server-connect-function, erc-server-flood-margin)
+ (erc-server-flood-penalty): Change group to 'erc-server.
+ (erc-server-send-ping-interval): Moved, renamed from
+ erc-ping-interval.
+ (erc-server-ping-handler): Moved, renamed from erc-ping-handler.
+ (erc-server-setup-periodical-server-ping): Moved, renamed from
+ erc-setup-periodical-server-ping.
+ (erc-server-connect): Add to docstring. Move more initialization
+ here.
+ (erc-server-processing-p): Docfix.
+ (erc-server-connect): Use 'raw-text like in the original version.
+ (erc-server-filter-function): Don't reset process coding system.
+
+ * erc-stamp.el (erc-add-timestamp): If the text at point is
+ invisible, don't insert a timestamp. Thanks to Pascal
+ J. Bourguignon for the suggestion.
+
+ * erc-match.el (erc-text-matched-hook): Don't hide fools by
+ default, but include it in the available options.
+
+2005-08-13 Michael Olson <mwolson(a)gnu.org>
+
+ * erc-*.el: s/erc-send-command/erc-server-send/g.
+ s/erc-process/erc-server-process/g (sort of). Occasional
+ whitespace and indentation fixes.
+
+ * erc-backend.el: Specify a few local variables for indentation.
+ Take one item off of the TODO list.
+ (erc-server-filter-data): Renamed from erc-previous-read. From
+ circe.
+ (erc-server-processing-p): New variable that indicates when we're
+ currently processing a message. From circe.
+ (erc-split-line-length): New option that gives the maximum line
+ length of a single message. From circe.
+ (erc-default-coding-system): Moved here from erc.el.
+ (erc-split-line): Renamed from erc-split-command and taken from
+ circe.
+ (erc-connect-function, erc-connect, erc-process-sentinel-1)
+ (erc-process-sentinel, erc-flood-exceeded-p, erc-send-command)
+ (erc-message, erc-upcase-first-word, erc-send-ctcp-message)
+ (erc-send-ctcp-notice): Moved here from erc.el.
+ (erc-server-filter-function): Renamed from erc-process-filter.
+ From circe.
+ (erc-server-process): Renamed from `erc-process' and moved here
+ from erc.el.
+ (erc-server-coding-system): Renamed from
+ `erc-default-coding-system'.
+ (erc-encoding-coding-alist): Moved here from erc.el.
+ (erc-server-flood-margin, erc-server-flood-penalty):
+ (erc-server-flood-last-message, erc-server-flood-queue):
+ (erc-server-flood-timer): New options from circe that allow
+ tweaking of flood control.
+ (erc-server-connect-function): Renamed from erc-connect-function.
+ (erc-flood-exceeded-p): Removed.
+ (erc-coding-system-for-target)
+ (erc-encode-string-for-target, erc-decode-string-from-target):
+ Moved here from erc.el
+ (erc-server-send): Renamed from erc-send-command. Adapted from
+ the circe function by the same name.
+ (erc-server-send-queue): New function from circe that implements
+ handling of a flood queue.
+ (erc-server-current-nick): Renamed from current-nick.
+ (erc-server-quitting): Renamed from `quitting'.
+ (erc-server-last-sent-time): Renamed from `last-sent-time'.
+ (erc-server-last-ping-time): Renamed from `last-ping-time'.
+ (erc-server-lines-sent): Renamed from `lines-sent'.
+ (erc-server-auto-reconnect): Renamed from `erc-auto-reconnect'.
+ (erc-server-coding-system): Docfix.
+ (erc-server-connect): Renamed from `erc-connect'. Require SERVER
+ and PORT parameters. Initialize several variables here. Don't
+ set `erc-insert-marker'. Use a per-server coding system via
+ erc-server-default-encoding.
+
+ * erc.el (erc-version-string): Changed to indicate we are running
+ the `more-backend' branch.
+ (erc-kill-queries-on-quit): Removed, since this is unused.
+ (erc-send-single-line): Implement flood control using
+ erc-split-line.
+ (erc-send-input): Move functionality of erc-send-single-line in
+ here.
+ (erc-send-single-line): Assimilated!
+ (erc-display-command, erc-display-msg): Handle display hooks.
+ (erc-auto-reconnect, current-nick, last-sent-time)
+ (last-ping-time, last-ctcp-time, erc-lines-sent, erc-bytes-sent)
+ (quitting): Moved to erc-backend.el.
+ (erc): Docfix. Don't initialize quite so many things here.
+
+2005-08-10 Michael Olson <mwolson(a)gnu.org>
+
+ * debian/copyright (Copyright): Remove notices for 4 people, since
+ they didn't contribute legally-significant changes, or have had
+ these changes overwritten.
+
+ * erc-log.el: Remove copyright notice.
+
+ * erc.el: Remove 3 copyright notices.
+
+2005-08-09 Michael Olson <mwolson(a)gnu.org>
+
+ * debian/changelog: Create 5.0.4-3 package. This doesn't serve
+ any purpose other than to thank Romain Francoise for some advice.
+
+ * Makefile (debrelease): Allow last upload and extra build options
+ to be specified.
+
+2005-08-08 Michael Olson <mwolson(a)gnu.org>
+
+ * debian/changelog: Create 5.0.4-2 package.
+
+ * debian/control (Uploaders): Add Romain Francoise.
+ (Standards-Version): Update to 3.6.2.
+ (Depends): Add `emacsen'.
+
+ * debian/scripts/startup.erc (load-path): Minor whitespace fixup.
+
+ * Makefile (clean): Split target from realclean and make it remove
+ files that aren't packaged in releases.
+ (clean, release): Minor cleanups.
+ (debrelease): Use debuild rather than dpkg-buildpackage since the
+ former calls lintian. Minor cleanups.
+ (debrelease-mwolson): New target that removes old Debian packages,
+ calls debrelease, and copies the resulting package to my dist dir.
+ (upload): New target that automates the process of uploading an
+ ERC release to sourceforge.
+
+ * erc.el (erc-mode): Use `make-local-variable' instead of
+ `make-variable-buffer-local'.
+
+2005-07-12 Michael Olson <mwolson(a)gnu.org>
+
+ * debian/changelog: Build 5.0.4-1.
+
+ * Makefile (release): Prepare zip file in addition to tarball.
+
+ * NEWS: Add item for the undo fix.
+
+2005-07-09 Michael Olson <mwolson(a)gnu.org>
+
+ * erc-nicklist.el (erc-nicklist-insert-contents): Check
+ erc-announced-name before erc-session-server. Make sure that we
+ can never get a stringp (nil) error.
+ (erc-nicklist-call-erc-command): If given no command, do nothing.
+ This fixes an error that used to occur when a stray mouse click
+ was made outside of the popup window, but on the erc-nicklist
+ menu.
+
+ * erc-bbdb.el (erc-bbdb-search-name-and-create): Get rid of the
+ infinite input loop when you want to create a new record. Replace
+ most of that with a completing read of existing nicks. If no nick
+ is chosen, create a new John Doe record. The net effect of this
+ is that the old behavior is re-instated, with the addition of one
+ completing read that happens when you do a /whois.
+
+2005-07-09 Johan Bockgård <bojohan(a)users.sourceforge.net>
+
+ * erc.el (erc-process-input-line): Docfix.
+ (erc-update-mode-line-buffer): Use `erc-propertize' instead of
+ `propertize'.
+ (erc-propertize): Move to erc-compat.el.
+
+ * erc-compat.el (erc-propertize): Move here from erc.el. Always
+ return a copy of the string (like `propertize' in GNU Emacs).
+
+ * erc-nicklist.el (erc-nicklist-icons-directory)
+ (erc-nicklist-voiced-position)
+ (erc-nicklist-insert-medium-name-or-icon): Docfix.
+ (erc-nicklist-insert-contents): Simplify.
+ (erc-nicklist-mode-map): Bind RET instead of `return'. Bind
+ `down-mouse-3' instead of `mouse-3'.
+ (erc-nicklist-kbd-cmd-QUERY): Cleanup regexp.
+ (erc-nicklist-channel-users-info): Docfix. Simplify.
+
+2005-07-02 Michael Olson <mwolson(a)gnu.org>
+
+ * images: New directory containing the images that are used by
+ erc-nicklist.el. These are from Gaim, and are thought to be
+ available under the terms of the GPL.
+
+ * erc-bbdb.el: Add local variables section to preserve tabs, since
+ that is the style used throughout this file. Apply patch from
+ Edgar Gonçalves as follows.
+ (erc-bbdb-bitlbee-name-field): New variable that indicates the
+ field name to use for annotating the "displayed name" of a bitlbee
+ contact.
+ (erc-bbdb-irc-highlight-field): Docfix.
+ (erc-bbdb-search-name-and-create): Prompt the user for the name of
+ a contact if none was found. Merge the new entries into the
+ specified contact. If new arg SILENT is non-nil, do not prompt
+ the user for a name or offer to merge the new entry.
+ (erc-bbdb-insinuate-and-show-entry): New arg SILENT is accepted,
+ which is passed on to erc-bbdb-search-name-and-create.
+ (erc-bbdb-whois): Tell erc-bbdb-search-name-and-create to prompt
+ for name if necessary.
+ (erc-bbdb-JOIN, erb-bbdb-NICK): Forbid
+ erc-bbdb-search-name-and-create from prompting for a name.
+
+ * erc-nicklist.el: Add local variables section to preserve tabs,
+ since that is the style used throughout this file. Apply patch
+ from Edgar Gonçalves as follows.
+ (erc-nicklist-use-icons): New option; if non-nil, display an icon
+ instead of the name of the chat medium.
+ (erc-nicklist-icons-directory): New option indicating the path to
+ the PNG files that are used for chat icons.
+ (erc-nicklist-use-icons): New option indicating whether to put
+ voiced nicks on top, bottom, or not to differentiate them. The
+ default is to put them on the bottom.
+ (erc-nicklist-bitlbee-connected-p): New variable that indicates
+ whether or not we are currently using bitlbee. An attempt will be
+ made to auto-detect the proper value. This is bound in the
+ `erc-nicklist-insert-contents' function.
+ (erc-nicklist-nicklist-images-alist): New variable that maps a
+ host type to its icon. This is set by `erc-nicklist'.
+ (erc-nicklist-insert-medium-name-or-icon): New function that
+ inserts an icon or string that identifies the current host type.
+ (erc-nicklist-search-for-nick): New function that attempts to find
+ a BBDB record that corresponds with this contact given its
+ finger-host. If found, return its bitlbee-nick field.
+ (erc-nicklist-insert-contents): New function that inserts the
+ contents of the nick list, including text properties and images.
+ (erc-nicklist): Populate `erc-nicklist-images-alist'. Move
+ nicklist content generation code to
+ `erc-nicklist-insert-contents'.
+ (erc-nicklist-mode-map): Map C-j to erc-nicklist-kbd-menu and RET
+ to erc-nicklist-kbd-cmd-QUERY.
+ (erc-nicklist-call-erc-command): Make use of
+ `switch-to-buffer-other-window'.
+ (erc-nicklist-cmd-QUERY): New function that opens a query buffer
+ for the given contact.
+ (erc-nicklist-kbd-cmd-QUERY): Ditto; contains most of the code.
+ (erc-nicklist-kbd-menu): New function that shows the nicklist
+ action menu.
+ (erc-nicklist-channel-users-info): Renamed from
+ `erc-nicklist-channel-nicks'. Implement sorting voiced users.
+
+2005-06-29 Johan Bockgård <bojohan+sf(a)dd.chalmers.se>
+
+ * erc-nickserv.el (erc-nickserv-alist): Fix regexp for Azzurra.
+
+2005-06-26 Michael Olson <mwolson(a)gnu.org>
+
+ * erc-autojoin.el (erc-autojoin-add, erc-autojoin-remove): Use
+ `erc-session-server' if `erc-announced-server-name' is nil. This
+ happens when servers don't send a 004 message.
+
+ * erc.el (erc-quit-server): Ditto.
+
+ * erc-ibuffer.el (erc-server, erc-server-name): Ditto.
+
+ * erc-notify.el (erc-notify-JOIN, erc-notify-NICK)
+ (erc-notify-QUIT): Ditto.
+
+2005-06-24 Johan Bockgård <bojohan+sf(a)dd.chalmers.se>
+
+ * erc.el (erc-default-coding-system)
+ (erc-handle-user-status-change): Docstring fix.
+ (with-erc-channel-buffer): Removed.
+ (erc-ignored-reply-p): Replace `with-erc-channel-buffer' with
+ `erc-with-buffer'.
+ (erc-display-line-1): Revision 1.730 broke undo. Fix it.
+
+2005-06-23 Michael Olson <mwolson(a)gnu.org>
+
+ * CREDITS: Add entries for Luigi Panzeri and Andreas Schwab.
+
+ * erc-nickserv.el (erc-nickserv-alist): Add entries for Azzurra
+ and OFTC. Thanks to Luigi Panzeri and Andreas Schwab for
+ providing these.
+
+2005-06-16 Michael Olson <mwolson(a)gnu.org>
+
+ * CREDITS: Add John Paul Wallington.
+
+ * erc.el: Thanks to John Paul Wallington for the following.
+ (erc-nickname-in-use): Use `string-to-number' instead of
+ `string-to-int'.
+
+ * erc-dcc.el (erc-dcc-handle-ctcp-send)
+ (erc-dcc-handle-ctcp-chat, erc-dcc-get-file)
+ (erc-dcc-chat-accept): Ditto.
+
+ * erc-identd.el (erc-identd-start): Ditto.
+
+2005-06-16 Johan Bockgård <bojohan+sf(a)dd.chalmers.se>
+
+ * erc.el (erc-mode-map): Suppress `font-lock-fontify-block' key
+ binding since it destroys face properties.
+
+2005-06-08 Michael Olson <mwolson(a)gnu.org>
+
+ * erc.el (erc-cmd-UNIGNORE): Use `erc-member-ignore-case' instead
+ of `member-ignore-case'. Thanks to bpalmer for the heads up.
+
+2005-06-06 Michael Olson <mwolson(a)gnu.org>
+
+ * erc.el (erc-modules): Fix a mistake I made when editing this a
+ few days ago. Modes should now be disabled properly.
+ (erc-cmd-BANLIST, erc-cmd-MASSUNBAN): Remove unnecessary call to
+ `format'. Thanks to Andreas Schwab for reporting this.
+
+ * debian/changelog: Close "README file missing" bug.
+
+ * debian/rules (binary-erc): Install README file.
+
2005-06-03 Michael Olson <mwolson(a)gnu.org>
* erc.el (erc-with-buffer): Set `lisp-indent-function' so Emacs
@@ -209,7 +673,7 @@
* erc-log.el (erc-save-buffer-in-logs): Replace tabs with spaces
in code indentation.
-
+
2005-02-28 Michael Olson <mwolson(a)gnu.org>
* erc.el (erc-display-message): Apply corrected patch from Henrik
@@ -247,14 +711,14 @@
refused. This error is reported differently when using
open-network-stream-nowait.
-2005-01-26 Diane Murray <dsm(a)muenster.de>
+2005-01-26 Diane Murray <disumu(a)x3y2z1.net>
* erc.el (erc-cmd-APPENDTOPIC, erc-set-topic): The control
character in `channel-topic' was changed to \C-o - replaced \C-c
with \C-o so that these functions work as expected again.
(erc-get-channel-mode-from-keypress): Doc fix.
-2005-01-25 Diane Murray <dsm(a)muenster.de>
+2005-01-25 Diane Murray <disumu(a)x3y2z1.net>
* erc.el, erc-button.el, erc-compat.el, erc-goodies.el,
erc-match.el, erc-nets.el, ChangeLog, NEWS: Merged bug fixes made
@@ -299,7 +763,7 @@
to t when calling `write-region' to ensure that further log
entries start on fresh lines.
-2005-01-21 Diane Murray <dsm(a)muenster.de>
+2005-01-21 Diane Murray <disumu(a)x3y2z1.net>
* erc-button.el (erc-button-add-face): Reverted my change to the
order faces since it had the unwanted effect of putting the button
@@ -310,7 +774,7 @@
* NEWS: Added the latest fixes.
-2005-01-20 Diane Murray <dsm(a)muenster.de>
+2005-01-20 Diane Murray <disumu(a)x3y2z1.net>
* erc-button.el, erc-match.el:
(erc-button-syntax-table, erc-match-syntax-table): Added \ as a
@@ -342,7 +806,7 @@
(erc-button-press-button): Silenced a byte-compiler warning about
too few arguments in a call to `error'.
-2005-01-19 Diane Murray <dsm(a)muenster.de>
+2005-01-19 Diane Murray <disumu(a)x3y2z1.net>
* NEWS: Added list of 5.0.1 fixes.
@@ -356,7 +820,7 @@
* Makefile: Change version to correspond with our new scheme.
-2005-01-18 Diane Murray <dsm(a)muenster.de>
+2005-01-18 Diane Murray <disumu(a)x3y2z1.net>
* erc-list.el (erc-chanlist-channel-line-regexp): Now matches
private channels, the channels `#' and `&', and channels with
@@ -386,7 +850,7 @@
copyright notices. If anyone has signed papers for Emacs in
general, merge them with the FSF's entry.
-2005-01-16 Diane Murray <dsm(a)muenster.de>
+2005-01-16 Diane Murray <disumu(a)x3y2z1.net>
* erc.el (erc): `erc-set-active-buffer' was being called before
`erc-process' was set, so that channels weren't being marked
@@ -397,7 +861,7 @@
* erc-backend.el (def-edebug-spec): This macro caused problems (in
XEmacs). Use its expansion directly.
-2005-01-15 Diane Murray <dsm(a)muenster.de>
+2005-01-15 Diane Murray <disumu(a)x3y2z1.net>
* erc-button.el (erc-button-add-button): Reverted previous change
since `:suppress-face' doesn't seem to be checked for a certain
@@ -406,7 +870,7 @@
This should fix the problem of faces being "covered" by
`erc-button-face'.
-2005-01-14 Diane Murray <dsm(a)muenster.de>
+2005-01-14 Diane Murray <disumu(a)x3y2z1.net>
* erc.el, erc-backend.el (erc-cmd-OPS, erc-cmd-COUNTRY,
erc-cmd-NICK, erc-process-ctcp-query, ERROR, PONG, 311, 312, 313,
@@ -430,7 +894,7 @@
* erc-button.el: Improved docstring for variable erc-button-face.
-2005-01-13 Diane Murray <dsm(a)muenster.de>
+2005-01-13 Diane Murray <disumu(a)x3y2z1.net>
* erc-menu.el (erc-menu-definition): "Topic set by channel
operator": Small word change. "Identify to NickServ...": Check
@@ -446,7 +910,7 @@
`erc-insert-marker' or error if does not exist.
(erc-send-current-line): Widen before trying to send anything.
-2005-01-13 Diane Murray <dsm(a)muenster.de>
+2005-01-13 Diane Murray <disumu(a)x3y2z1.net>
* erc.el, erc-backend.el, erc-list.el:
(erc-update-mode-line-buffer): Strip controls characters from
@@ -477,7 +941,7 @@
`erc-track-priority-faces-only', `erc-track-exclude', and
`erc-track-exclude-types' now work with server buffers.
-2005-01-12 Diane Murray <dsm(a)muenster.de>
+2005-01-12 Diane Murray <disumu(a)x3y2z1.net>
* erc-backend.el (475): Prompt for the channel's key if
`erc-prompt-for-channel-key' is non-nil. Send a new JOIN message
@@ -503,7 +967,7 @@
XEmacs). The new function `erc-modified-channels-object' is used
to generate updated values for the same-named variable.
-2005-01-08 Diane Murray <dsm(a)muenster.de>
+2005-01-08 Diane Murray <disumu(a)x3y2z1.net>
* ChangeLog.2002: Changed instances of my sourceforge username and
email address to real name and email.
@@ -577,7 +1041,7 @@
* NEWS: Use 3rd level heading instead of bullets for lists that
contain descriptions.
-2005-01-07 Diane Murray <dsm(a)muenster.de>
+2005-01-07 Diane Murray <disumu(a)x3y2z1.net>
* erc-list.el: Require 'sort.
(erc-chanlist): Disable undo in the channel list buffer.
@@ -633,7 +1097,7 @@
policy toward ChangeLog entries, which is that they should be
manually updated whenever a change is committed.
-2005-01-04 Diane Murray <dsm(a)muenster.de>
+2005-01-04 Diane Murray <disumu(a)x3y2z1.net>
* erc.el (erc-connection-established, erc-login): Update the
mode-line.
@@ -646,7 +1110,7 @@
* AUTHORS: Update list of authors.
-2005-01-02 Diane Murray <dsm(a)muenster.de>
+2005-01-02 Diane Murray <disumu(a)x3y2z1.net>
* erc-goodies.el (erc-control-characters): New customization
group.
1.27 +1 -1 XEmacs/packages/xemacs-packages/erc/Makefile
Index: Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/Makefile,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -p -r1.26 -r1.27
--- Makefile 2005/06/05 17:21:45 1.26
+++ Makefile 2005/10/15 18:15:26 1.27
@@ -19,7 +19,7 @@
VERSION = 0.17
-AUTHOR_VERSION = Version 5.0 Revision: 1.757
+AUTHOR_VERSION = Version 5.0 Revision: 1.774
MAINTAINER = Adrian Aichner <adrian(a)xemacs.org>
PACKAGE = erc
PKG_TYPE = regular
1.7 +38 -13 XEmacs/packages/xemacs-packages/erc/Makefile.upstream
Index: Makefile.upstream
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/Makefile.upstream,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- Makefile.upstream 2005/06/05 15:47:01 1.6
+++ Makefile.upstream 2005/10/15 18:15:26 1.7
@@ -1,5 +1,7 @@
VERSION=5.1
SNAPDIR=erc-$(VERSION)
+LASTUPLOAD = 5.0.4-2
+BUILDOPTS =
SPECIAL = erc-auto.el
UNCOMPILED = erc-chess.el erc-bbdb.el erc-ibuffer.el erc-speak.el \
@@ -31,17 +33,19 @@ erc-auto.el: erc-auto.in $(SOURCE)
-f batch-byte-compile $<
clean:
- rm -f *~ *.elc
+ -rm -f *~ *.elc
-distclean realclean: clean
+realclean: clean
-rm -f $(TARGET) $(SPECIAL)
-debrelease: $(ALLSOURCE) $(SPECIAL)
- rm -Rf ../$(SNAPDIR) && \
- mkdir ../$(SNAPDIR) && chmod 0755 ../$(SNAPDIR) && \
- cp $(ALLSOURCE) $(SPECIAL) $(MISC) ../$(SNAPDIR) && \
- cd ../ && \
- tar -czf erc_$(VERSION).orig.tar.gz $(SNAPDIR)
+distclean:
+ -rm -f $(TARGET)
+ -rm -Rf ../$(SNAPDIR)
+
+debrelease: $(ALLSOURCE) $(SPECIAL) distclean
+ mkdir ../$(SNAPDIR) && chmod 0755 ../$(SNAPDIR)
+ cp $(ALLSOURCE) $(SPECIAL) $(MISC) ../$(SNAPDIR)
+ (cd .. && tar -czf erc_$(VERSION).orig.tar.gz $(SNAPDIR))
cp -R debian ../$(SNAPDIR)
test -d ../$(SNAPDIR)/debian/CVS && rm -R \
../$(SNAPDIR)/debian/CVS \
@@ -51,12 +55,33 @@ debrelease: $(ALLSOURCE) $(SPECIAL)
../$(SNAPDIR)/debian/.arch-ids \
../$(SNAPDIR)/debian/maint/.arch-ids \
../$(SNAPDIR)/debian/scripts/.arch-ids || :
- cd ../$(SNAPDIR) && dpkg-buildpackage -rfakeroot
+ (cd ../$(SNAPDIR) && \
+ dpkg-buildpackage -v$(LASTUPLOAD) $(BUILDOPTS) \
+ -us -uc -rfakeroot && \
+ echo "Running lintian ..." && \
+ lintian -i ../erc_$(VERSION)*.deb || : && \
+ echo "Done running lintian." && \
+ debsign)
+
+debrelease-mwolson:
+ -rm -f ../../dist/erc_*
+ -rm -f ../erc_$(VERSION)*
+ $(MAKE) debrelease
+ cp ../erc_$(VERSION)* ../../dist
-release: autoloads
- rm -rf ../erc-$(VERSION)
- mkdir ../erc-$(VERSION)
+release: autoloads distclean
+ mkdir ../$(SNAPDIR) && chmod 0755 ../$(SNAPDIR)
cp $(SPECIAL) $(UNCOMPILED) $(SOURCE) $(MISC) ../erc-$(VERSION)
- cd ..; tar czf erc-$(VERSION).tar.gz erc-$(VERSION)/*
+ (cd .. && tar czf erc-$(VERSION).tar.gz erc-$(VERSION)/*; \
+ zip -r erc-$(VERSION).zip erc-$(VERSION))
todo: erc.elc
+
+upload:
+ (cd .. && echo open
ftp://upload.sourceforge.net > upload.lftp ; \
+ echo cd /incoming >> upload.lftp ; \
+ echo mput erc-$(VERSION).zip >> upload.lftp ; \
+ echo mput erc-$(VERSION).tar.gz >> upload.lftp ; \
+ echo close >> upload.lftp ; \
+ lftp -f upload.lftp ; \
+ rm -f upload.lftp)
1.3 +4 -0 XEmacs/packages/xemacs-packages/erc/NEWS
Index: NEWS
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/NEWS,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- NEWS 2005/06/05 15:47:01 1.2
+++ NEWS 2005/10/15 18:15:26 1.3
@@ -1,5 +1,9 @@
ERC NEWS -*- outline -*-
+* Fixes since ERC 5.0.3
+
+** Fix a problem with undo in channels.
+
* Fixes since ERC 5.0.2
** Fix typo in the `ctcp-request-to' entry of the English catalog.
1.8 +16 -8 XEmacs/packages/xemacs-packages/erc/erc-autoaway.el
Index: erc-autoaway.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-autoaway.el,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- erc-autoaway.el 2005/06/05 15:47:01 1.7
+++ erc-autoaway.el 2005/10/15 18:15:27 1.8
@@ -16,9 +16,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -29,7 +29,7 @@
(require 'erc)
-(defconst erc-autoaway-version "$Revision: 1.22 $"
+(defconst erc-autoaway-version "$Revision: 1.24 $"
"ERC Autoaway revision.")
(defgroup erc-autoaway nil
@@ -117,6 +117,8 @@ See `erc-auto-discard-away'."
:group 'erc-autoaway
:type 'regexp)
+(eval-when-compile (defvar erc-autoaway-idle-seconds))
+
(defun erc-autoaway-reestablish-idletimer ()
"Reestablish the emacs idletimer.
You have to call this function each time you change
@@ -141,8 +143,9 @@ you have to run `erc-autoaway-reestablis
(erc-autoaway-reestablish-idletimer)))
:type 'number)
-(defcustom erc-autoaway-message "I'm gone (autoaway after %i seconds of
idletime)"
- "*Message ERC will use when he sets you automatically away.
+(defcustom erc-autoaway-message
+ "I'm gone (autoaway after %i seconds of idletime)"
+ "*Message ERC will use when he sets you automatically away.
It is used as a `format' string with the argument of the idletime in
seconds."
:group 'erc-autoaway
@@ -156,8 +159,8 @@ seconds."
This is one global variable since a user talking on one net can talk
on another net too."
(when (and erc-auto-discard-away
- (stringp line)
- (not (string-match erc-autoaway-no-auto-discard-regexp line)))
+ (stringp line)
+ (not (string-match erc-autoaway-no-auto-discard-regexp line)))
(erc-autoaway-set-back line))
(setq erc-autoaway-last-sent-time (erc-current-time)))
@@ -196,3 +199,8 @@ exceeds `erc-autoaway-idle-seconds'."
(provide 'erc-autoaway)
;;; erc-autoaway.el ends here
+;;
+;; Local Variables:
+;; indent-tabs-mode: t
+;; tab-width: 8
+;; End:
1.7 +7 -8 XEmacs/packages/xemacs-packages/erc/erc-autojoin.el
Index: erc-autojoin.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-autojoin.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- erc-autojoin.el 2005/04/10 14:47:34 1.6
+++ erc-autojoin.el 2005/10/15 18:15:27 1.7
@@ -17,9 +17,9 @@
;; License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -34,7 +34,7 @@
(require 'erc)
;;; Minor Mode
-(defconst erc-autojoin-version "$Revision: 1.12 $"
+(defconst erc-autojoin-version "$Revision: 1.15 $"
"ERC autojoin revision.")
(defgroup erc-autojoin nil
@@ -83,14 +83,14 @@ servers, presumably in the same domain."
(dolist (l erc-autojoin-channels-alist)
(when (string-match (car l) server)
(dolist (chan (cdr l))
- (erc-send-command (concat "join " chan))))))
+ (erc-server-send (concat "join " chan))))))
(defun erc-autojoin-add (proc parsed)
"Add the channel being joined to `erc-autojoin-channels-alist'."
(let* ((chnl (erc-response.contents parsed))
(nick (car (erc-parse-user (erc-response.sender parsed))))
(server (with-current-buffer (process-buffer proc)
- erc-announced-server-name)))
+ (or erc-server-announced-name erc-session-server))))
(when (erc-current-nick-p nick)
(when (and erc-autojoin-domain-only
(string-match "[^.]+\\.\\([^.]+\\.[^.]+\\)$" server))
@@ -113,7 +113,7 @@ servers, presumably in the same domain."
(let* ((chnl (car (erc-response.command-args parsed)))
(nick (car (erc-parse-user (erc-response.sender parsed))))
(server (with-current-buffer (process-buffer proc)
- erc-announced-server-name)))
+ (or erc-server-announced-name erc-session-server))))
(when (erc-current-nick-p nick)
(when (and erc-autojoin-domain-only
(string-match "[^.]+\\.\\([^.]+\\.[^.]+\\)$" server))
@@ -135,5 +135,4 @@ servers, presumably in the same domain."
;; Local Variables:
;; indent-tabs-mode: t
;; tab-width: 8
-;; standard-indent: 4
;; End:
1.4 +778 -218 XEmacs/packages/xemacs-packages/erc/erc-backend.el
Index: erc-backend.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-backend.el,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- erc-backend.el 2005/04/25 21:47:25 1.3
+++ erc-backend.el 2005/10/15 18:15:27 1.4
@@ -7,7 +7,7 @@
;; Created: 2004-05-7
;; Keywords: IRC chat client internet
-;; COPYRIGHT NOTICE
+;; This file is not part of GNU Emacs.
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;;; Commentary:
-;;
+
;; This file defines backend network communication handlers for ERC.
;;
;; How things work:
@@ -78,11 +78,8 @@
;; meanings), and generally display something, usually using
;; `erc-display-message'.
-;;; TODO;
-;; o Rip out the sending commands stuff from erc.el and rewrite it in
-;; a slightly more abstracted fashion. That should probably go in
-;; here too.
-;;
+;;; TODO:
+
;; o Generalise the display-line code so that we can use it to
;; display the stuff we send, as well as the stuff we receive.
;; Then, move all display-related code into another backend-like
@@ -92,15 +89,22 @@
;; first).
;;; History:
-;; 2004/05/10 --- Handler bodies taken out of erc.el and ported to
-;; new interface.
+;; 2004/05/10 -- Handler bodies taken out of erc.el and ported to new
+;; interface.
+
+;; 2005-08-13 -- Moved sending commands from erc.el.
+
;;; Code:
+
(require 'cl)
(autoload 'erc-with-buffer "erc" nil nil 'macro)
+(autoload 'erc-log "erc" nil nil 'macro)
-(defconst erc-backend-version "$Revision: 1.28 $")
+;;;; Variables and options
+(defconst erc-backend-version "$Revision: 1.35 $")
+
(defvar erc-server-responses (make-hash-table :test #'equal)
"Hashtable mapping server responses to their handler hooks.")
@@ -111,6 +115,611 @@
(command-args '() :type list)
(contents "" :type string))
+;;; User data
+
+(defvar erc-server-current-nick nil
+ "Nickname on the current server.
+Use `erc-current-nick' to access this.")
+(make-variable-buffer-local 'erc-server-current-nick)
+
+;;; Server attributes
+
+(defvar erc-server-process nil
+ "The process object of the corresponding server connection.")
+(make-variable-buffer-local 'erc-server-process)
+
+(defvar erc-session-server nil
+ "The server name used to connect to for this session.")
+(make-variable-buffer-local 'erc-session-server)
+
+(defvar erc-session-port nil
+ "The port used to connect to.")
+(make-variable-buffer-local 'erc-session-port)
+
+(defvar erc-server-announced-name nil
+ "The name the server announced to use.")
+(make-variable-buffer-local 'erc-server-announced-name)
+
+(defvar erc-server-parameters nil
+ "Alist listing the supported server parameters.
+
+This is only set if the server sends 005 messages saying what is
+supported on the server.
+
+Entries are of the form:
+ (PARAMETER . VALUE)
+or
+ (PARAMETER) if no value is provided.
+
+Some examples of possible parameters sent by servers:
+CHANMODES=b,k,l,imnpst - list of supported channel modes
+CHANNELLEN=50 - maximum length of channel names
+CHANTYPES=#&!+ - supported channel prefixes
+CHARMAPPING=rfc1459 - character mapping used for nickname and channels
+KICKLEN=160 - maximum allowed kick message length
+MAXBANS=30 - maximum number of bans per channel
+MAXCHANNELS=10 - maximum number of channels allowed to join
+NETWORK=EFnet - the network identifier
+NICKLEN=9 - maximum allowed length of nicknames
+PREFIX=(ov)@+ - list of channel modes and the user prefixes if user has mode
+RFC2812 - server supports RFC 2812 features
+SILENCE=10 - supports the SILENCE command, maximum allowed number of entries
+TOPICLEN=160 - maximum allowed topic length
+WALLCHOPS - supports sending messages to all operators in a channel")
+(make-variable-buffer-local 'erc-server-parameters)
+
+;;; Server and connection state
+
+(defvar erc-server-connected nil
+ "Non-nil if the `current-buffer' is associated with an open IRC connection.
+This variable is buffer-local.")
+(make-variable-buffer-local 'erc-server-connected)
+
+(defvar erc-server-quitting nil
+ "Non-nil if the user requests a quit.")
+(make-variable-buffer-local 'erc-server-quitting)
+
+(defvar erc-server-lines-sent nil
+ "Line counter.")
+(make-variable-buffer-local 'erc-server-lines-sent)
+
+(defvar erc-server-last-peers '(nil . nil)
+ "Last peers used, both sender and receiver.
+Those are used for /MSG destination shortcuts.")
+(make-variable-buffer-local 'erc-server-last-peers)
+
+(defvar erc-server-last-sent-time nil
+ "Time the message was sent.
+This is useful for flood protection.")
+(make-variable-buffer-local 'erc-server-last-sent-time)
+
+(defvar erc-server-last-ping-time nil
+ "Time the last ping was sent.
+This is useful for flood protection.")
+(make-variable-buffer-local 'erc-server-last-ping-time)
+
+(defvar erc-server-lag nil
+ "Calculated server lag time in seconds.
+This variable is only set in a server buffer.")
+(make-variable-buffer-local 'erc-server-lag)
+
+(defvar erc-server-filter-data nil
+ "The data that arrived from the server
+but has not been processed yet.")
+(make-variable-buffer-local 'erc-server-filter-data)
+
+(defvar erc-server-duplicates (make-hash-table :test 'equal)
+ "Internal variable used to track duplicate messages.")
+(make-variable-buffer-local 'erc-server-duplicates)
+
+;; From Circe
+(defvar erc-server-processing-p nil
+ "Non-nil when we're currently processing a message.
+
+When ERC receives a private message, it sets up a new buffer for
+this query. These in turn, though, do start flyspell. This
+involves starting an external process, in which case Emacs will
+wait - and when it waits, it does accept other stuff from, say,
+network exceptions. So, if someone sends you two messages
+quickly after each other, ispell is started for the first, but
+might take long enough for the second message to be processed
+first.")
+(make-variable-buffer-local 'erc-server-processing-p)
+
+(defvar erc-server-flood-last-message 0
+ "When we sent the last message.
+See `erc-server-flood-margin' for an explanation of the flood
+protection algorithm.")
+(make-variable-buffer-local 'erc-server-flood-last-message)
+
+(defvar erc-server-flood-queue nil
+ "The queue of messages waiting to be sent to the server.
+See `erc-server-flood-margin' for an explanation of the flood
+protection algorithm.")
+(make-variable-buffer-local 'erc-server-flood-queue)
+
+(defvar erc-server-flood-timer nil
+ "The timer to resume sending.")
+(make-variable-buffer-local 'erc-server-flood-timer)
+
+;;; IRC protocol and misc options
+
+(defgroup erc-server nil
+ "Parameters for dealing with IRC servers."
+ :group 'erc)
+
+(defcustom erc-server-auto-reconnect t
+ "Non-nil means that ERC will attempt to reestablish broken connections.
+
+Reconnection will happen automatically for any unexpected disconnection."
+ :group 'erc-server
+ :type 'boolean)
+
+(defcustom erc-split-line-length 440
+ "*The maximum length of a single message.
+If a message exceeds this size, it is broken into multiple ones.
+
+IRC allows for lines up to 512 bytes. Two of them are CR LF.
+And a typical message looks like this:
+
+ :nicky!uhuser@host212223.dialin.fnordisp.net PRIVMSG #lazybastards :Hello!
+
+You can limit here the maximum length of the \"Hello!\" part.
+Good luck."
+ :type 'integer
+ :group 'erc-server)
+
+(defcustom erc-server-coding-system (if (and (fboundp 'coding-system-p)
+ (coding-system-p 'undecided)
+ (coding-system-p 'utf-8))
+ '(utf-8 . undecided)
+ nil)
+ "The default coding system for incoming and outgoing text.
+This is either a coding system, a cons, a function, or nil.
+
+If a cons, the encoding system for outgoing text is in the car
+and the decoding system for incoming text is in the cdr. The most
+interesting use for this is to put `undecided' in the cdr. If a
+function, it is called with no arguments and should return a
+coding system or a cons as described above. Note that you can use
+the dynamically bound variable `target' to get the current
+target. See `erc-coding-system-for-target'.
+
+If you need to send non-ASCII text to people not using a client that
+does decoding on its own, you must tell ERC what encoding to use.
+Emacs cannot guess it, since it does not know what the people on the
+other end of the line are using."
+ :group 'erc-server
+ :type '(choice (const :tag "None" nil)
+ coding-system
+ (cons (coding-system :tag "encoding" :value utf-8)
+ (coding-system :tag "decoding" :value undecided))
+ function))
+
+(defcustom erc-encoding-coding-alist nil
+ "Alist of target regexp and coding-system pairs to use.
+This overrides `erc-server-coding-system' depending on the
+current target as returned by `erc-default-target'.
+
+Example: If you know that the channel #linux-ru uses the coding-system
+`cyrillic-koi8', then add '(\"#linux-ru\" . cyrillic-koi8) to the
+alist."
+ :group 'erc-server
+ :type '(repeat (cons (string :tag "Target")
+ coding-system)))
+
+(defcustom erc-server-connect-function
+ (if (and (fboundp 'open-network-stream-nowait)
+ ;; CVS Emacs claims to define open-network-stream-nowait on
+ ;; windows, however, it does, in fact, not work.
+ (not (memq system-type '(windows-nt cygwin ms-dos darwin))))
+ 'open-network-stream-nowait
+ 'open-network-stream)
+ "Function used to initiate a connection.
+It should take same arguments as `open-network-stream' does."
+ :group 'erc-server
+ :type 'function)
+
+(defcustom erc-server-prevent-duplicates '("301")
+ "*Either nil or a list of strings.
+Each string is a IRC message type, like PRIVMSG or NOTICE.
+All Message types in that list of subjected to duplicate prevention."
+ :type '(choice (const nil) (list string))
+ :group 'erc-server)
+
+(defcustom erc-server-duplicate-timeout 60
+ "*The time allowed in seconds between duplicate messages.
+
+If two identical messages arrive within this value of one another, the second
+isn't displayed."
+ :type 'integer
+ :group 'erc-server)
+
+;;; Flood-related
+
+;; Most of this is courtesy of Jorgen Schaefer and Circe
+;; (
http://www.nongnu.org/circe)
+
+(defcustom erc-server-flood-margin 10
+ "*A margin on how much excess data we send.
+The flood protection algorithm of ERC works like the one
+detailed in RFC 2813, section 5.8 \"Flood control of clients\".
+
+ * If `erc-server-flood-last-message' is less than the current
+ time, set it equal.
+ * While `erc-server-flood-last-message' is less than
+ `erc-server-flood-margin' seconds ahead of the current
+ time, send a message, and increase
+ `erc-server-flood-last-message' by
+ `erc-server-flood-penalty' for each message."
+ :type 'integer
+ :group 'erc-server)
+
+(defcustom erc-server-flood-penalty 3
+ "How much we penalize a message.
+See `erc-server-flood-margin' for an explanation of the flood
+protection algorithm."
+ :type 'integer
+ :group 'erc-server)
+
+;; Ping handling
+
+(defcustom erc-server-send-ping-interval 90
+ "*Interval of sending pings to the server, in seconds.
+If this is set to nil, pinging the server is disabled."
+ :group 'erc-server
+ :type '(choice (const nil) (integer :tag "Seconds")))
+
+(defvar erc-server-ping-handler nil
+ "This variable holds the periodic ping timer.")
+(make-variable-buffer-local 'erc-server-ping-handler)
+
+;;;; Helper functions
+
+;; From Circe
+(defun erc-split-line (longline)
+ "Return a list of lines which are not too long for IRC.
+The length is specified in `erc-split-line-length'.
+
+Currently this is called by `erc-send-input'."
+ (if (< (length longline)
+ erc-split-line-length)
+ (list longline)
+ (with-temp-buffer
+ (insert longline)
+ (let ((fill-column erc-split-line-length))
+ (fill-region (point-min) (point-max)
+ nil t))
+ (split-string (buffer-string) "\n"))))
+
+;; Used by CTCP functions
+(defun erc-upcase-first-word (str)
+ "Upcase the first word in STR."
+ (with-temp-buffer
+ (insert str)
+ (goto-char (point-min))
+ (upcase-word 1)
+ (buffer-string)))
+
+(defun erc-server-setup-periodical-server-ping (&rest ignore)
+ "Set up a timer to periodically ping the current server."
+ (and erc-server-ping-handler (erc-cancel-timer erc-server-ping-handler))
+ (when erc-server-send-ping-interval
+ (setq erc-server-ping-handler
+ (run-with-timer
+ 4 erc-server-send-ping-interval
+ (lambda (buf)
+ (when (buffer-live-p buf)
+ (with-current-buffer buf
+ (erc-server-send
+ (format "PING %.0f"
+ (erc-current-time))))))
+ (current-buffer)))))
+
+;;;; Connecting to a server
+
+(defun erc-server-connect (server port)
+ "Perform the connection and login.
+We will store server variables in the current buffer."
+ (let ((msg (erc-format-message 'connect ?S server ?p port)))
+ (message "%s" msg)
+ (setq erc-server-process
+ (funcall erc-server-connect-function
+ (format "erc-%s-%s" server port)
+ (current-buffer) server port))
+ (message "%s...done" msg))
+ ;; Misc server variables
+ (setq erc-server-quitting nil)
+ (setq erc-server-last-sent-time (erc-current-time))
+ (setq erc-server-last-ping-time (erc-current-time))
+ (setq erc-server-lines-sent 0)
+ ;; last peers (sender and receiver)
+ (setq erc-server-last-peers '(nil . nil))
+ ;; process handlers
+ (set-process-sentinel erc-server-process 'erc-process-sentinel)
+ (set-process-filter erc-server-process 'erc-server-filter-function)
+ ;; we do our own encoding and decoding
+ (when (fboundp 'set-process-coding-system)
+ (set-process-coding-system erc-server-process 'raw-text))
+ (set-marker (process-mark erc-server-process) (point))
+ (erc-log "\n\n\n********************************************\n")
+ (message (erc-format-message 'login ?n (erc-current-nick)))
+ ;; wait with script loading until we receive a confirmation (first
+ ;; MOTD line)
+ (if (eq erc-server-connect-function 'open-network-stream-nowait)
+ ;; it's a bit unclear otherwise that it's attempting to establish a
+ ;; connection
+ (erc-display-message nil nil (current-buffer)
+ "Opening connection..\n")
+ (erc-login)))
+
+(defun erc-server-filter-function (process string)
+ "The process filter for the ERC server."
+ (with-current-buffer (process-buffer process)
+ ;; If you think this is written in a weird way - please refer to the
+ ;; docstring of `erc-server-processing-p'
+ (if erc-server-processing-p
+ (setq erc-server-filter-data
+ (if erc-server-filter-data
+ (concat erc-server-filter-data string)
+ string))
+ ;; This will be true even if another process is spawned!
+ (let ((erc-server-processing-p t))
+ (setq erc-server-filter-data (if erc-server-filter-data
+ (concat erc-server-filter-data
+ string)
+ string))
+ (while (and erc-server-filter-data
+ (string-match "[\n\r]+" erc-server-filter-data))
+ (let ((line (substring erc-server-filter-data
+ 0 (match-beginning 0))))
+ (setq erc-server-filter-data
+ (if (= (match-end 0)
+ (length erc-server-filter-data))
+ nil
+ (substring erc-server-filter-data
+ (match-end 0))))
+ (erc-parse-server-response process line)))))))
+
+(defun erc-process-sentinel-1 (event)
+ "This will be called when erc-process-sentinel has decided that we
+are going to quit. Determine whether user has quit or whether erc has
+been terminated. Conditionally try to reconnect and take appropriate
+action."
+ (if erc-server-quitting
+ ;; normal quit
+ (progn
+ (let ((string "\n\n*** ERC finished ***\n")
+ (inhibit-read-only t))
+ (erc-put-text-property 0 (length string)
+ 'face 'erc-error-face string)
+ (insert string))
+ (when erc-kill-server-buffer-on-quit
+ (set-buffer-modified-p nil)
+ (kill-buffer (current-buffer))))
+ ;; unexpected disconnect
+ (erc-display-message nil 'error (current-buffer)
+ (if erc-server-auto-reconnect
+ 'disconnected
+ 'disconnected-noreconnect))
+ (erc-update-mode-line)
+ (erc-set-active-buffer (current-buffer))
+ (setq erc-server-last-sent-time 0)
+ (setq erc-server-lines-sent 0)
+ (if (and erc-server-auto-reconnect
+ (not (string= event "deleted\n"))
+ ;; open-network-stream-nowait error for connection refused
+ (not (string= event "failed with code 111\n")))
+ ;; Yuck, this should perhaps funcall
+ ;; erc-server-reconnect-function with no args
+ (erc erc-session-server erc-session-port erc-server-current-nick
+ erc-session-user-full-name t erc-session-password)
+ ;; terminate, do not reconnect
+ (let ((string (concat "\n\n*** ERC terminated: " event
+ "\n"))
+ (inhibit-read-only t))
+ (erc-put-text-property 0 (length string)
+ 'face 'erc-error-face string)
+ (insert string)))))
+
+(defun erc-process-sentinel (cproc event)
+ "Sentinel function for ERC process."
+ (with-current-buffer (process-buffer cproc)
+ (erc-log (format
+ "SENTINEL: proc: %S status: %S event: %S (quitting: %S)"
+ cproc (process-status cproc) event erc-server-quitting))
+ (if (equal event "open\n")
+ ;; newly opened connection (no wait)
+ (erc-login)
+ ;; assume event is 'failed
+ (let ((buf (process-buffer cproc)))
+ (erc-with-all-buffers-of-server cproc nil
+ (setq erc-server-connected nil))
+ (when erc-server-ping-handler
+ (progn (erc-cancel-timer erc-server-ping-handler)
+ (setq erc-server-ping-handler nil)))
+ (run-hook-with-args 'erc-disconnected-hook
+ (erc-current-nick) (system-name) "")
+ ;; Remove the prompt
+ (forward-line 0)
+ (erc-remove-text-properties-region (point) (point-max))
+ (delete-region (point) (point-max))
+ ;; Decide what to do with the buffer
+ ;; Restart if disconnected
+ (erc-process-sentinel-1 event)
+ ;; Make sure we don't write to the buffer if it has been
+ ;; killed
+ (when (buffer-live-p buf)
+ (erc-update-mode-line)
+ (set-buffer-modified-p nil))))))
+
+;;;; Sending messages
+
+(defun erc-coding-system-for-target (target)
+ "Return the coding system or cons cell appropriate for TARGET.
+This is determined via `erc-encoding-coding-alist' or
+`erc-server-coding-system'."
+ (or (cdr (assoc target erc-encoding-coding-alist))
+ (and (functionp erc-server-coding-system)
+ (funcall erc-server-coding-system))
+ erc-server-coding-system))
+
+(defun erc-decode-string-from-target (str target)
+ "Decode STR as appropriate for TARGET.
+This is indicated by `erc-encoding-coding-alist', defaulting to the value of
+`erc-server-coding-system'."
+ (let ((coding (erc-coding-system-for-target target)))
+ (when (consp coding)
+ (setq coding (cdr coding)))
+ (erc-decode-coding-string str coding)))
+
+;; proposed name, not used by anything yet
+(defun erc-send-line (text display-fn)
+ "Send TEXT to the current server. Wrapping and flood control apply.
+Use DISPLAY-FN to show the results."
+ (mapc (lambda (line)
+ (erc-server-send line)
+ (funcall display-fn))
+ (erc-split-line text)))
+
+;; From Circe, with modifications
+(defun erc-server-send (string &optional forcep target)
+ "Send STRING to the current server.
+If FORCEP is non-nil, no flood protection is done - the string is
+sent directly. This might cause the messages to arrive in a wrong
+order.
+
+If TARGET is specified, look up encoding information for that
+channel in `erc-encoding-coding-alist' or
+`erc-server-coding-system'.
+
+See `erc-server-flood-margin' for an explanation of the flood
+protection algorithm."
+ (erc-log (concat "erc-server-send: " string "(" (buffer-name)
")"))
+ (setq erc-server-last-sent-time (erc-current-time))
+ (let ((buf (erc-server-buffer))
+ (encoding (erc-coding-system-for-target
+ (or target (erc-default-target)))))
+ (when (consp encoding)
+ (setq encoding (car encoding)))
+ (if buf
+ (with-current-buffer buf
+ (let ((str (concat string "\r\n")))
+ (if forcep
+ (progn
+ (setq erc-server-flood-last-message
+ (+ erc-server-flood-penalty
+ erc-server-flood-last-message))
+ (erc-log-irc-protocol str 'outbound)
+ ;; Set encoding just before sending the string
+ (when (fboundp 'set-process-coding-system)
+ (set-process-coding-system erc-server-process
+ 'raw-text encoding))
+ (process-send-string erc-server-process str))
+ (setq erc-server-flood-queue
+ (append erc-server-flood-queue
+ (list (cons str encoding))))
+ (erc-server-send-queue (current-buffer))))
+ t)
+ (message "ERC: No process running")
+ nil)))
+
+;; From Circe
+(defun erc-server-send-queue (buffer)
+ "Send messages in `erc-server-flood-queue'.
+See `erc-server-flood-margin' for an explanation of the flood
+protection algorithm."
+ (with-current-buffer buffer
+ (let ((now (erc-current-time)))
+ (when erc-server-flood-timer
+ (erc-cancel-timer erc-server-flood-timer)
+ (setq erc-server-flood-timer nil))
+ (when (< erc-server-flood-last-message
+ now)
+ (setq erc-server-flood-last-message now))
+ (while (and erc-server-flood-queue
+ (< erc-server-flood-last-message
+ (+ now erc-server-flood-margin)))
+ (let ((msg (caar erc-server-flood-queue))
+ (encoding (cdar erc-server-flood-queue)))
+ (setq erc-server-flood-queue (cdr erc-server-flood-queue)
+ erc-server-flood-last-message
+ (+ erc-server-flood-last-message
+ erc-server-flood-penalty))
+ (erc-log-irc-protocol msg 'outbound)
+ (erc-log (concat "erc-server-send-queue: "
+ msg "(" (buffer-name buffer) ")"))
+ ;; Set encoding just before sending the string
+ (when (fboundp 'set-process-coding-system)
+ (set-process-coding-system erc-server-process
+ 'raw-text encoding))
+ (process-send-string erc-server-process msg)))
+ (when erc-server-flood-queue
+ (setq erc-server-flood-timer
+ (run-at-time 2 nil #'erc-server-send-queue buffer))))))
+
+(defun erc-message (message-command line &optional force)
+ "Send LINE to the server as a privmsg or a notice.
+MESSAGE-COMMAND should be either \"PRIVMSG\" or \"NOTICE\".
+If the target is \",\", the last person you've got a message from will
+be used. If the target is \".\", the last person you've sent a message
+to will be used."
+ (cond
+ ((string-match "^\\s-*\\(\\S-+\\) ?\\(.*\\)" line)
+ (let ((tgt (match-string 1 line))
+ (s (match-string 2 line)))
+ (erc-log (format "cmd: MSG(%s): [%s] %s" message-command tgt s))
+ (cond
+ ((string= tgt ",")
+ (if (car erc-server-last-peers)
+ (setq tgt (car erc-server-last-peers))
+ (setq tgt nil)))
+ ((string= tgt ".")
+ (if (cdr erc-server-last-peers)
+ (setq tgt (cdr erc-server-last-peers))
+ (setq tgt nil))))
+ (cond
+ (tgt
+ (setcdr erc-server-last-peers tgt)
+ (erc-server-send (format "%s %s :%s" message-command tgt s)
+ force))
+ (t
+ (erc-display-message nil 'error (current-buffer) 'no-target))))
+ t)
+ (t nil)))
+
+;;; CTCP
+
+(defun erc-send-ctcp-message (tgt l &optional force)
+ "Send CTCP message L to TGT.
+
+If TGT is nil the message is not sent.
+The command must contain neither a prefix nor a trailing `\\n'.
+
+See also `erc-server-send'."
+ (let ((l (erc-upcase-first-word l)))
+ (cond
+ (tgt
+ (erc-log (format "erc-send-CTCP-message: [%s] %s" tgt l))
+ (erc-server-send (format "PRIVMSG %s :\C-a%s\C-a" tgt l)
+ force)))))
+
+(defun erc-send-ctcp-notice (tgt l &optional force)
+ "Send CTCP notice L to TGT.
+
+If TGT is nil the message is not sent.
+The command must contain neither a prefix nor a trailing `\\n'.
+
+See also `erc-server-send'."
+ (let ((l (erc-upcase-first-word l)))
+ (cond
+ (tgt
+ (erc-log (format "erc-send-CTCP-notice: [%s] %s" tgt l))
+ (erc-server-send (format "NOTICE %s :\C-a%s\C-a" tgt l)
+ force)))))
+
+;;;; Handling responses
+
(defun erc-parse-server-response (proc string)
"Parse and act upon a complete line from an IRC server.
PROC is the process (connection) from which STRING was received.
@@ -118,31 +727,31 @@ PROCs `process-buffer' is `current-buffe
(unless (string= string "") ;; Ignore empty strings
(save-match-data
(let ((posn (if (eq (aref string 0) ?:)
- (string-match " " string)
- 0))
- (msg (make-erc-response :unparsed string)))
+ (string-match " " string)
+ 0))
+ (msg (make-erc-response :unparsed string)))
- (setf (erc-response.sender msg)
+ (setf (erc-response.sender msg)
(if (eq posn 0)
erc-session-server
(substring string 1 posn)))
- (setf (erc-response.command msg)
+ (setf (erc-response.command msg)
(let* ((bposn (string-match "[^ ]" string posn))
(eposn (string-match " " string bposn)))
(setq posn (and eposn
(string-match "[^ ]" string eposn)))
(substring string bposn eposn)))
- (while (and posn
- (not (eq (aref string posn) ?:)))
- (push (let* ((bposn posn)
+ (while (and posn
+ (not (eq (aref string posn) ?:)))
+ (push (let* ((bposn posn)
(eposn (string-match " " string bposn)))
(setq posn (and eposn
(string-match "[^ ]" string eposn)))
(substring string bposn eposn))
(erc-response.command-args msg)))
- (when posn
+ (when posn
(let ((str (substring string (1+ posn))))
(push str (erc-response.command-args msg))))
@@ -161,96 +770,49 @@ PROCs `process-buffer' is `current-buffe
If there is a channel name in `erc-response.command-args', decode
`erc-response' acroding this channel name and
-`erc-encoding-coding-alist', or use `erc-default-coding-system'
+`erc-encoding-coding-alist', or use `erc-server-coding-system'
for decoding."
(let ((args (erc-response.command-args parsed-response))
- (decode-target nil)
- (decoded-args ()))
+ (decode-target nil)
+ (decoded-args ()))
(dolist (arg args nil)
(when (string-match "^[#&].*" arg)
- (setq decode-target arg)))
+ (setq decode-target arg)))
(when (stringp decode-target)
(setq decode-target (erc-decode-string-from-target decode-target nil)))
(setf (erc-response.unparsed parsed-response)
- (erc-decode-string-from-target
- (erc-response.unparsed parsed-response)
- decode-target))
+ (erc-decode-string-from-target
+ (erc-response.unparsed parsed-response)
+ decode-target))
(setf (erc-response.sender parsed-response)
- (erc-decode-string-from-target
- (erc-response.sender parsed-response)
- decode-target))
+ (erc-decode-string-from-target
+ (erc-response.sender parsed-response)
+ decode-target))
(setf (erc-response.command parsed-response)
- (erc-decode-string-from-target
- (erc-response.command parsed-response)
- decode-target))
+ (erc-decode-string-from-target
+ (erc-response.command parsed-response)
+ decode-target))
(dolist (arg (nreverse args) nil)
(push (erc-decode-string-from-target arg decode-target)
- decoded-args))
+ decoded-args))
(setf (erc-response.command-args parsed-response) decoded-args)
(setf (erc-response.contents parsed-response)
- (erc-decode-string-from-target
- (erc-response.contents parsed-response)
- decode-target))))
-
-;; (defun erc-parse-server-response (process response)
-;; "Parse a server PROCESS's IRC RESPONSE."
-;; ;; FIXME: this function doesn't do the same as our original
-;; ;; `erc-parse-line-from-server' on responses not starting with a
-;; ;; colon -- Lawrence 2004/05/10
-;; ;; FIXME: we currently don't deal correctly with IPv6 hosts in the
-;; ;; hostmask, they contain colons which messes up our parsing.
-;; ;; There's nothing in the IRC RFCs which says how to deal with
-;; ;; this, so at the moment we just ignore it. However, it does mean
-;; ;; that anything sent by people with IPv6 hostmasks doesn't get
-;; ;; shown. -- Lawrence 2004/05/15
-;; (unless (string= response "") ; don't care about empty
strings.
-;; (save-match-data
-;; (let ((message (make-erc-response)))
-;; (setf (erc-response.unparsed message) response)
-;; ;; Everything after the second colon is the contents of the
-;; ;; message.
-;; (when (string-match "\\([^:]*:[^:]*:\\)\\(.*\\)" response)
-;; (setf (erc-response.contents message) (match-string 2 response))
-;; ;; XEmacs' 5th argument to `replace-match' behaves unlike
-;; ;; Emacs' when dealing with strings (rather than buffers).
-;; (setq response (match-string 1 response)))
-;; ;; If the message starts with a colon, then everything up to
-;; ;; the first space is the sender of the message (be it nick
-;; ;; or server). If it doesn't, just use the current server.
-;; (if (string-match "^:\\([^ ]*\\) " response)
-;; (progn
-;; (setf (erc-response.sender message) (match-string 1 response))
-;; (setq response (replace-match "" nil t response)))
-;; (setf (erc-response.sender message) erc-session-server))
-
-;; ;; The next part of the message, up to the space, is the
-;; ;; command. (e.g. PRIVMSG).
-;; (when (string-match "\\([^ ]+\\) " response)
-;; (setf (erc-response.command message) (match-string 1 response))
-;; (setq response (replace-match "" nil t response)))
-
-;; ;; Everything up to the next colon are arguments to the
-;; ;; command.
-;; (while (not (string-match "^\\(:?:\\|$\\)" response))
-;; (when (string-match "\\([^ ]+\\)\\(:? \\|$\\)" response)
-;; (push (match-string 1 response)
-;; (erc-response.command-args message))
-;; (setq response (replace-match "" nil t response))))
-;; (setf (erc-response.command-args message)
-;; (reverse (erc-response.command-args message)))
-;; (erc-handle-parsed-server-response process message)))))
+ (erc-decode-string-from-target
+ (erc-response.contents parsed-response)
+ decode-target))))
(defun erc-handle-parsed-server-response (process parsed-response)
"Handle a pre-parsed PARSED-RESPONSE from PROCESS.
Hands off to helper functions via `erc-call-hooks'."
- (if (member (erc-response.command parsed-response) erc-prevent-duplicates)
+ (if (member (erc-response.command parsed-response)
+ erc-server-prevent-duplicates)
(let ((m (erc-response.unparsed parsed-response)))
;; duplicate supression
- (if (< (or (gethash m erc-duplicates) 0)
- (- (erc-current-time) erc-duplicate-timeout))
+ (if (< (or (gethash m erc-server-duplicates) 0)
+ (- (erc-current-time) erc-server-duplicate-timeout))
(erc-call-hooks process parsed-response))
- (puthash m (erc-current-time) erc-duplicates))
+ (puthash m (erc-current-time) erc-server-duplicates))
;; Hand off to the relevant handler.
(erc-call-hooks process parsed-response)))
@@ -276,17 +838,18 @@ Finds hooks by looking in the `erc-serve
(defun erc-handle-unknown-server-response (proc parsed)
"Display unknown server response's message."
(let ((line (concat (erc-response.sender parsed)
- " "
- (erc-response.command parsed)
- " "
- (mapconcat 'identity (erc-response.command-args parsed) " "))))
+ " "
+ (erc-response.command parsed)
+ " "
+ (mapconcat 'identity (erc-response.command-args parsed)
+ " "))))
(erc-display-message parsed 'notice proc line)))
(put 'define-erc-response-handler 'edebug-form-spec
'(&define :name erc-response-handler
- (name &rest name)
- &optional sexp sexp def-body))
+ (name &rest name)
+ &optional sexp sexp def-body))
(defmacro* define-erc-response-handler ((name &rest aliases)
&optional extra-fn-doc extra-var-doc
@@ -420,7 +983,7 @@ add things to `%s' instead."
for a in aliases
nconc (list `(defalias ',fn ',fn-name)
`(defvar ,var ',fn-name ,(format hook-doc a))
- `(put ',var 'definition-name ',hook-name))))))
+ `(put ',var 'definition-name ',hook-name))))))
(define-erc-response-handler (ERROR)
"Handle an ERROR command from the server." nil
@@ -435,7 +998,7 @@ add things to `%s' instead."
(chnl (erc-response.contents parsed)))
(multiple-value-bind (nick login host)
(erc-parse-user (erc-response.sender parsed))
- (setq invitation chnl)
+ (setq erc-invitation chnl)
(when (string= target (erc-current-nick))
(erc-display-message
parsed 'notice 'active
@@ -453,33 +1016,34 @@ add things to `%s' instead."
(if (string-match "^\\(.*\\)?\^g.*$" chnl)
(setq chnl (match-string 1 chnl)))
(save-excursion
- (let* ((str (cond
- ;; If I have joined a channel
- ((erc-current-nick-p nick)
- (setq buffer (erc erc-session-server erc-session-port
- nick erc-session-user-full-name
- nil nil
- erc-default-recipients chnl erc-process))
- (when buffer
- (set-buffer buffer)
- (erc-add-default-channel chnl)
- (erc-send-command (format "MODE %s" chnl)))
- (erc-with-buffer (chnl proc)
- (erc-channel-begin-receiving-names))
- (erc-update-mode-line)
- (run-hooks 'erc-join-hook)
- (erc-make-notice
- (erc-format-message 'JOIN-you ?c chnl)))
- (t
- (setq buffer (erc-get-buffer chnl proc))
- (erc-make-notice
- (erc-format-message
- 'JOIN ?n nick ?u login ?h host ?c chnl))))))
- (when buffer (set-buffer buffer))
- (erc-update-channel-member chnl nick nick t nil nil host login)
- ;; on join, we want to stay in the new channel buffer
- ;;(set-buffer ob)
- (erc-display-message parsed nil buffer str))))))
+ (let* ((str (cond
+ ;; If I have joined a channel
+ ((erc-current-nick-p nick)
+ (setq buffer (erc erc-session-server erc-session-port
+ nick erc-session-user-full-name
+ nil nil
+ erc-default-recipients chnl
+ erc-server-process))
+ (when buffer
+ (set-buffer buffer)
+ (erc-add-default-channel chnl)
+ (erc-server-send (format "MODE %s" chnl)))
+ (erc-with-buffer (chnl proc)
+ (erc-channel-begin-receiving-names))
+ (erc-update-mode-line)
+ (run-hooks 'erc-join-hook)
+ (erc-make-notice
+ (erc-format-message 'JOIN-you ?c chnl)))
+ (t
+ (setq buffer (erc-get-buffer chnl proc))
+ (erc-make-notice
+ (erc-format-message
+ 'JOIN ?n nick ?u login ?h host ?c chnl))))))
+ (when buffer (set-buffer buffer))
+ (erc-update-channel-member chnl nick nick t nil nil host login)
+ ;; on join, we want to stay in the new channel buffer
+ ;;(set-buffer ob)
+ (erc-display-message parsed nil buffer str))))))
(define-erc-response-handler (KICK)
"Handle kick messages received from the server." nil
@@ -507,7 +1071,7 @@ add things to `%s' instead."
'KICK-by-you ?k tgt ?c ch ?r reason))
(t (erc-display-message
parsed 'notice buffer
- 'KICK ?k tgt ?n nick ?u login ?h host ?c ch ?r reason))))))
+ 'KICK ?k tgt ?n nick ?u login ?h host ?c ch ?r reason))))))
(define-erc-response-handler (MODE)
"Handle server mode changes." nil
@@ -527,12 +1091,12 @@ add things to `%s' instead."
(current-buffer))
(erc-update-modes tgt mode nick host login))
(if (or (string= login "") (string= host ""))
- (erc-display-message parsed 'notice buf
- 'MODE-nick ?n nick
- ?t tgt ?m mode)
- (erc-display-message parsed 'notice buf
- 'MODE ?n nick ?u login
- ?h host ?t tgt ?m mode)))
+ (erc-display-message parsed 'notice buf
+ 'MODE-nick ?n nick
+ ?t tgt ?m mode)
+ (erc-display-message parsed 'notice buf
+ 'MODE ?n nick ?u login
+ ?h host ?t tgt ?m mode)))
(erc-banlist-update proc parsed))))
(define-erc-response-handler (NICK)
@@ -569,8 +1133,8 @@ add things to `%s' instead."
(run-hook-with-args 'erc-nick-changed-functions nn nick))
(t
(erc-handle-user-status-change 'nick (list nick login host) (list nn))
- (erc-display-message parsed 'notice bufs 'NICK ?n nick
- ?u login ?h host ?N nn))))))
+ (erc-display-message parsed 'notice bufs 'NICK ?n nick
+ ?u login ?h host ?N nn))))))
(define-erc-response-handler (PART)
"Handle part messages." nil
@@ -581,8 +1145,8 @@ add things to `%s' instead."
(erc-parse-user (erc-response.sender parsed))
(erc-remove-channel-member buffer nick)
(erc-display-message parsed 'notice buffer
- 'PART ?n nick ?u login
- ?h host ?c chnl ?r (or reason ""))
+ 'PART ?n nick ?u login
+ ?h host ?c chnl ?r (or reason ""))
(when (string= nick (erc-current-nick))
(run-hook-with-args 'erc-part-hook buffer)
(erc-with-buffer
@@ -598,86 +1162,81 @@ add things to `%s' instead."
(let ((pinger (first (erc-response.command-args parsed))))
(erc-log (format "PING: %s" pinger))
;; ping response to the server MUST be forced, or you can lose big
- (erc-send-command (format "PONG :%s" pinger) t)
+ (erc-server-send (format "PONG :%s" pinger) t)
(when erc-verbose-server-ping
(erc-display-message
parsed 'error proc
- 'PING ?s (erc-time-diff last-ping-time (erc-current-time))))
- (setq last-ping-time (erc-current-time))))
+ 'PING ?s (erc-time-diff erc-server-last-ping-time (erc-current-time))))
+ (setq erc-server-last-ping-time (erc-current-time))))
(define-erc-response-handler (PONG)
"Handle pong messages." nil
(let ((time (string-to-number (erc-response.contents parsed))))
(when (> time 0)
- (setq erc-lag (erc-time-diff time (erc-current-time)))
+ (setq erc-server-lag (erc-time-diff time (erc-current-time)))
(when erc-verbose-server-ping
- (erc-display-message
- parsed 'notice proc 'PONG
- ?h (first (erc-response.command-args parsed)) ?i erc-lag
- ?s (if (/= erc-lag 1) "s" "")))
+ (erc-display-message
+ parsed 'notice proc 'PONG
+ ?h (first (erc-response.command-args parsed)) ?i erc-server-lag
+ ?s (if (/= erc-server-lag 1) "s" "")))
(erc-update-mode-line))))
(define-erc-response-handler (PRIVMSG NOTICE)
nil nil
(let ((sender-spec (erc-response.sender parsed))
- (cmd (erc-response.command parsed))
- (tgt (car (erc-response.command-args parsed)))
- (msg (erc-response.contents parsed)))
+ (cmd (erc-response.command parsed))
+ (tgt (car (erc-response.command-args parsed)))
+ (msg (erc-response.contents parsed)))
(if (or (erc-ignored-user-p sender-spec)
- (erc-ignored-reply-p msg tgt proc))
- (when erc-minibuffer-ignored
- (message "Ignored %s from %s to %s" cmd sender-spec tgt))
+ (erc-ignored-reply-p msg tgt proc))
+ (when erc-minibuffer-ignored
+ (message "Ignored %s from %s to %s" cmd sender-spec tgt))
(let* ((sndr (erc-parse-user sender-spec))
- (nick (nth 0 sndr))
- (login (nth 1 sndr))
- (host (nth 2 sndr))
- (msgp (string= cmd "PRIVMSG"))
- (noticep (string= cmd "NOTICE"))
- ;; S.B. downcase *both* tgt and current nick
- (privp (erc-current-nick-p tgt))
- s buffer
- fnick
- ;; Apparently we don't need this now that FKtPp's patch
- ;; is installed
-;; (msg (erc-decode-string-from-target msg
-;; (if privp sender-spec tgt)))
- )
- (setf (erc-response.contents parsed) msg)
- (setq buffer (erc-get-buffer (if privp nick tgt) proc))
- (when buffer
- (with-current-buffer buffer
- ;; update the chat partner info. Add to the list if private
- ;; message. We will accumulate private identities indefinitely
- ;; at this point.
- (erc-update-channel-member (if privp nick tgt) nick nick
+ (nick (nth 0 sndr))
+ (login (nth 1 sndr))
+ (host (nth 2 sndr))
+ (msgp (string= cmd "PRIVMSG"))
+ (noticep (string= cmd "NOTICE"))
+ ;; S.B. downcase *both* tgt and current nick
+ (privp (erc-current-nick-p tgt))
+ s buffer
+ fnick)
+ (setf (erc-response.contents parsed) msg)
+ (setq buffer (erc-get-buffer (if privp nick tgt) proc))
+ (when buffer
+ (with-current-buffer buffer
+ ;; update the chat partner info. Add to the list if private
+ ;; message. We will accumulate private identities indefinitely
+ ;; at this point.
+ (erc-update-channel-member (if privp nick tgt) nick nick
privp nil nil host login nil nil t)
- (let ((cdata (erc-get-channel-user nick)))
- (setq fnick (funcall erc-format-nick-function (car cdata) (cdr cdata))))))
- (cond
- ((erc-is-message-ctcp-p msg)
- (setq s (if msgp
- (erc-process-ctcp-query proc parsed nick login host)
- (erc-process-ctcp-reply proc parsed nick login host
- (match-string 1 msg)))))
- (t
- (setcar last-peers nick)
- (setq s (erc-format-privmessage (or fnick nick) msg
- ;; If buffer is a query buffer,
- ;; format the nick as for a channel.
- (and (not
- (and
- buffer
- (erc-query-buffer-p buffer)
- erc-format-query-as-channel-p))
- privp)
- msgp))))
- (when s
- (if (and noticep privp)
- (progn
- (run-hook-with-args 'erc-echo-notice-always-hook
- s parsed buffer nick)
- (run-hook-with-args-until-success
- 'erc-echo-notice-hook s parsed buffer nick))
+ (let ((cdata (erc-get-channel-user nick)))
+ (setq fnick (funcall erc-format-nick-function
+ (car cdata) (cdr cdata))))))
+ (cond
+ ((erc-is-message-ctcp-p msg)
+ (setq s (if msgp
+ (erc-process-ctcp-query proc parsed nick login host)
+ (erc-process-ctcp-reply proc parsed nick login host
+ (match-string 1 msg)))))
+ (t
+ (setcar erc-server-last-peers nick)
+ (setq s (erc-format-privmessage
+ (or fnick nick) msg
+ ;; If buffer is a query buffer,
+ ;; format the nick as for a channel.
+ (and (not (and buffer
+ (erc-query-buffer-p buffer)
+ erc-format-query-as-channel-p))
+ privp)
+ msgp))))
+ (when s
+ (if (and noticep privp)
+ (progn
+ (run-hook-with-args 'erc-echo-notice-always-hook
+ s parsed buffer nick)
+ (run-hook-with-args-until-success
+ 'erc-echo-notice-hook s parsed buffer nick))
(erc-display-message parsed nil buffer s)))
(when (string= cmd "PRIVMSG")
(erc-auto-query proc parsed))))))
@@ -696,8 +1255,8 @@ add things to `%s' instead."
(erc-remove-user nick)
(setq reason (erc-wash-quit-reason reason nick login host))
(erc-display-message parsed 'notice bufs
- 'QUIT ?n nick ?u login
- ?h host ?r reason))))
+ 'QUIT ?n nick ?u login
+ ?h host ?r reason))))
(define-erc-response-handler (TOPIC)
nil nil
@@ -709,8 +1268,8 @@ add things to `%s' instead."
(erc-update-channel-member ch nick nick nil nil nil host login)
(erc-update-channel-topic ch (format "%s\C-o (%s, %s)" topic nick
time))
(erc-display-message parsed 'notice (erc-get-buffer ch proc)
- 'TOPIC ?n nick ?u login ?h host
- ?c ch ?T topic))))
+ 'TOPIC ?n nick ?u login ?h host
+ ?c ch ?T topic))))
(define-erc-response-handler (WALLOPS)
nil nil
@@ -722,7 +1281,7 @@ add things to `%s' instead."
'WALLOPS ?n nick ?m message))))
(define-erc-response-handler (001)
- "Set current-nick to reflect server settings and display the welcome
message."
+ "Set `erc-server-current-nick' to reflect server settings and display the
welcome message."
nil
(erc-set-current-nick (first (erc-response.command-args parsed)))
(erc-update-mode-line) ; needed here?
@@ -735,7 +1294,7 @@ add things to `%s' instead."
"Display the server's message of the day." nil
(erc-handle-login)
(erc-display-message
- parsed 'notice (if erc-connected 'active proc)
+ parsed 'notice (if erc-server-connected 'active proc)
(erc-response.contents parsed)))
(define-erc-response-handler (376 422)
@@ -747,8 +1306,7 @@ add things to `%s' instead."
nil nil
(multiple-value-bind (server-name server-version)
(cdr (erc-response.command-args parsed))
- (setq erc-server-version server-version)
- (setq erc-announced-server-name server-name)
+ (setq erc-server-announced-name server-name)
(erc-update-mode-line-buffer (process-buffer proc))
(erc-display-message
parsed 'notice proc
@@ -768,9 +1326,9 @@ certain commands are accepted and more.
A server may send more than one 005 message."
nil
(let ((line (mapconcat 'identity
- (setf (erc-response.command-args parsed)
- (cdr (erc-response.command-args parsed)))
- " ")))
+ (setf (erc-response.command-args parsed)
+ (cdr (erc-response.command-args parsed)))
+ " ")))
(while (erc-response.command-args parsed)
(let ((section (pop (erc-response.command-args parsed))))
;; fill erc-server-parameters
@@ -787,10 +1345,9 @@ A server may send more than one 005 mess
nil nil
(let* ((nick (first (erc-response.command-args parsed)))
(modes (mapconcat 'identity
- (cdr (erc-response.command-args parsed)) " ")))
+ (cdr (erc-response.command-args parsed)) " ")))
(erc-set-modes nick modes)
(erc-display-message parsed 'notice 'active 's221 ?n nick ?m modes)))
-
(define-erc-response-handler (252)
"Display the number of IRC operators online." nil
@@ -901,9 +1458,7 @@ See `erc-display-server-message'." nil
(define-erc-response-handler (321)
"LIST header." nil
- ;; FIXME: Need to change this reference to an erc-prefixed one.
- ;; -- Lawrence 2004/05/10
- (setq channel-list nil)
+ (setq erc-channel-list nil)
(erc-display-message parsed 'notice 'active 's321))
(define-erc-response-handler (322)
@@ -911,7 +1466,7 @@ See `erc-display-server-message'." nil
(let ((topic (erc-response.contents parsed)))
(multiple-value-bind (channel num-users)
(cdr (erc-response.command-args parsed))
- (add-to-list 'channel-list (list channel))
+ (add-to-list 'erc-channel-list (list channel))
(erc-update-channel-topic channel topic)
(erc-display-message
parsed 'notice 'active 's322
@@ -998,7 +1553,8 @@ See `erc-display-server-message'." nil
(when (string-match "\\(^[0-9]+ \\)\\(.*\\)$" full-name)
(setq hopcount (match-string 1 full-name))
(setq full-name (match-string 2 full-name)))
- (erc-update-channel-member channel nick nick nil nil nil host user full-name)
+ (erc-update-channel-member channel nick nick nil nil nil host
+ user full-name)
(erc-display-message parsed 'notice 'active 's352
?c channel ?n nick ?a away-flag
?u user ?h host ?f full-name))))
@@ -1056,7 +1612,7 @@ See `erc-display-server-message'." nil
(let ((nick/channel (second (erc-response.command-args parsed))))
(when erc-whowas-on-nosuchnick
(erc-log (format "cmd: WHOWAS: %s" nick/channel))
- (erc-send-command (format "WHOWAS %s 1" nick/channel)))
+ (erc-server-send (format "WHOWAS %s 1" nick/channel)))
(erc-display-message parsed '(notice error) 'active
's401 ?n nick/channel)))
@@ -1150,7 +1706,7 @@ See `erc-display-server-message'." nil
(let ((channel (second (erc-response.command-args parsed)))
(message (erc-response.contents parsed)))
(erc-display-message parsed 'notice (erc-get-buffer channel proc)
- (format "%s: %s" channel message))))
+ (format "%s: %s" channel message))))
(define-erc-response-handler (482)
nil nil
@@ -1160,7 +1716,7 @@ See `erc-display-server-message'." nil
?c channel ?m message)))
(define-erc-response-handler (431 445 446 451 462 463 464 465 481 483 484 485
- 491 501 502)
+ 491 501 502)
;; 431 - No nickname given
;; 445 - SUMMON has been disabled
;; 446 - USERS has been disabled
@@ -1193,6 +1749,10 @@ See `erc-display-server-message'." nil
;; 423 424 436 441 443 444 467 471 472 473 KILL)
;; nil nil
;; (ignore proc parsed))
+
(provide 'erc-backend)
;;; erc-backend.el ends here
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; End:
1.6 +38 -15 XEmacs/packages/xemacs-packages/erc/erc-bbdb.el
Index: erc-bbdb.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-bbdb.el,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- erc-bbdb.el 2005/04/10 14:47:35 1.5
+++ erc-bbdb.el 2005/10/15 18:15:27 1.6
@@ -4,6 +4,12 @@
;; Author: Andreas Fuchs <asf(a)void.at>
;; Maintainer: Mario Lang <mlang(a)delysid.org>
+;; Changes by Edgar Gonçalves <edgar.goncalves(a)inesc-id.pt>
+;; May 31 2005:
+;; - new variable: erc-bbdb-bitlbee-name-field - the field name for the
+;; msn/icq/etc nick
+;; - nick doesn't go the the name. now it asks for an existing record to
+;; merge with. If none, then create a new one with the nick as name.
;; This is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by
@@ -16,9 +22,9 @@
;; License for more details.
;;
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -41,7 +47,7 @@
(require 'bbdb-gui)
(require 'bbdb-hooks)
-(defconst erc-bbdb-version "$Revision: 1.25 $"
+(defconst erc-bbdb-version "$Revision: 1.29 $"
"ERC BBDB revision.")
(defgroup erc-bbdb nil
@@ -88,22 +94,32 @@ or a person joined a channel visible on
:type 'symbol)
(defcustom erc-bbdb-irc-highlight-field 'irc-highlight
- "The notes field name to use for highlighting of a person's messages"
+ "The notes field name to use for highlighting a person's messages."
:group 'erc-bbdb
:type 'symbol)
+(defcustom erc-bbdb-bitlbee-name-field 'bitlbee-name
+ "The notes field name to use for annotating bitlbee displayed name.
+This is the name that a bitlbee (AIM/MSN/ICQ) contact provides as
+their \"displayed name\"."
+ :group 'erc-bbdb
+ :type 'symbol)
+
(defcustom erc-bbdb-elide-display nil
"*If t, show BBDB popup buffer elided"
:group 'erc-bbdb
:type 'boolean)
-(defun erc-bbdb-search-name-and-create (create-p name nick finger-host)
+(defun erc-bbdb-search-name-and-create (create-p name nick finger-host silent)
(let* ((ircnick (cons erc-bbdb-irc-nick-field (concat "^"
(regexp-quote nick))))
(finger (cons bbdb-finger-host-field (regexp-quote finger-host)))
(record (or (bbdb-search (bbdb-records) nil nil nil ircnick)
(and name (bbdb-search-simple name nil))
(bbdb-search (bbdb-records) nil nil nil finger)
+ (unless silent
+ (bbdb-completing-read-one-record
+ "Merge using record of: "))
(when create-p
(bbdb-create-internal (or name
"John Doe")
@@ -124,14 +140,16 @@ or a person joined a channel visible on
'visible))))))
(bbdb-display-records (list record)))))
-(defun erc-bbdb-insinuate-and-show-entry (create-p proc nick name finger-host
&optional chan new-nick)
+(defun erc-bbdb-insinuate-and-show-entry (create-p proc nick name finger-host silent
&optional chan new-nick)
(let ((record (erc-bbdb-search-name-and-create
- create-p name nick finger-host)))
+ create-p nil nick finger-host silent))) ;; don't search for a name
(when record
(bbdb-annotate-notes record (or new-nick nick) erc-bbdb-irc-nick-field)
(bbdb-annotate-notes record finger-host bbdb-finger-host-field)
+ (and name
+ (bbdb-annotate-notes record name erc-bbdb-bitlbee-name-field t))
(and chan
- (not (eq chan t))
+ (not (eq chan t))
(bbdb-annotate-notes record chan erc-bbdb-irc-channel-field))
(erc-bbdb-highlight-record record)
(erc-bbdb-show-entry record chan proc))))
@@ -139,12 +157,12 @@ or a person joined a channel visible on
(defun erc-bbdb-whois (proc parsed)
(let (; We could use server name too, probably
(nick (second (erc-response.command-args parsed)))
- (name (erc-response.contents parsed))
+ (name (erc-response.contents parsed)) ;; msn nick!
(finger-host (concat (third (erc-response.command-args parsed))
- "@"
- (fourth (erc-response.command-args parsed)))))
+ "@"
+ (fourth (erc-response.command-args parsed)))))
(erc-bbdb-insinuate-and-show-entry erc-bbdb-auto-create-on-whois-p proc
- nick name finger-host t)))
+ nick name finger-host nil t)))
(defun erc-bbdb-JOIN (proc parsed)
(let* ((sender (erc-parse-user (erc-response.sender parsed)))
@@ -154,7 +172,7 @@ or a person joined a channel visible on
(finger-host (concat (nth 1 sender) "@" (nth 2 sender))))
(erc-bbdb-insinuate-and-show-entry
erc-bbdb-auto-create-on-join-p proc
- nick nil finger-host channel)))))
+ nick nil finger-host t channel)))))
(defun erc-bbdb-NICK (proc parsed)
"Annotate new nick name to a record in case it already exists."
@@ -164,7 +182,7 @@ or a person joined a channel visible on
(let* ((finger-host (concat (nth 1 sender) "@" (nth 2 sender))))
(erc-bbdb-insinuate-and-show-entry
erc-bbdb-auto-create-on-nick-p proc
- nick nil finger-host nil (erc-response.contents parsed))))))
+ nick nil finger-host t nil (erc-response.contents parsed))))))
(defun erc-bbdb-init-highlighting-hook-fun (proc parsed)
(erc-bbdb-init-highlighting))
@@ -222,3 +240,8 @@ counterparts `erc-pals', `erc-dangerous-
(provide 'erc-bbdb)
;;; erc-bbdb.el ends here
+;;
+;; Local Variables:
+;; indent-tabs-mode: t
+;; tab-width: 8
+;; End:
1.8 +4 -4 XEmacs/packages/xemacs-packages/erc/erc-button.el
Index: erc-button.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-button.el,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- erc-button.el 2005/04/10 14:47:35 1.7
+++ erc-button.el 2005/10/15 18:15:27 1.8
@@ -18,9 +18,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -65,7 +65,7 @@
;;; Variables
-(defconst erc-button-version "$Revision: 1.64 $"
+(defconst erc-button-version "$Revision: 1.65 $"
"ERC button mode revision.")
(defcustom erc-button-face 'bold
1.5 +13 -8 XEmacs/packages/xemacs-packages/erc/erc-chess.el
Index: erc-chess.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-chess.el,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- erc-chess.el 2005/04/10 14:47:35 1.4
+++ erc-chess.el 2005/10/15 18:15:27 1.5
@@ -16,9 +16,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -34,7 +34,7 @@
;;;; Variables
-(defconst erc-chess-version "$Revision: 1.24 $"
+(defconst erc-chess-version "$Revision: 1.26 $"
"ERC chess revision.")
(defgroup erc-chess nil
@@ -86,13 +86,13 @@ This is the main handler for the erc-che
(cond
((eq event 'initialize)
(setq erc-chess-partner (car args))
- (setq erc-process (nth 1 args))
+ (setq erc-server-process (nth 1 args))
t)
((eq event 'send)
;; Transmit the string given in `(car args)' to the nick
;; saved in `erc-chess-partner'.
- (let ((buf (process-buffer erc-process))
+ (let ((buf (process-buffer erc-server-process))
(nick erc-chess-partner)
(msg (substring (car args) 0 (1- (length (car args))))))
(when (buffer-live-p buf)
@@ -107,7 +107,7 @@ This is the main handler for the erc-che
(chess-display-popup display)))
((eq event 'destroy)
- (let* ((buf (process-buffer erc-process))
+ (let* ((buf (process-buffer erc-server-process))
(nick (erc-downcase erc-chess-partner))
(engine (current-buffer)))
(with-current-buffer (erc-server-buffer)
@@ -126,7 +126,7 @@ This is the main handler for the erc-che
This function adds to `erc-chess-alist' too."
;; Maybe move that into the connect callback?
(let* ((objects (chess-session 'erc-chess t 'erc-chess-response-handler
- nick erc-process))
+ nick erc-server-process))
(engine (car objects))
(display (cadr objects)))
(when engine
@@ -175,3 +175,8 @@ NICK should be the first and only arg to
(provide 'erc-chess)
;;; erc-chess.el ends here
+;;
+;; Local Variables:
+;; indent-tabs-mode: t
+;; tab-width: 8
+;; End:
1.6 +87 -68 XEmacs/packages/xemacs-packages/erc/erc-compat.el
Index: erc-compat.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-compat.el,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- erc-compat.el 2005/06/05 15:47:02 1.5
+++ erc-compat.el 2005/10/15 18:15:27 1.6
@@ -18,9 +18,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -28,7 +28,7 @@
;;; Code:
-(defconst erc-compat-version "$Revision: 1.19 $"
+(defconst erc-compat-version "$Revision: 1.23 $"
"ERC compat revision.")
;; erc-define-minor-mode: the easy-mmode-define-minor-mode available
@@ -45,38 +45,38 @@
(mapc 'unintern (apropos-internal "^erc-compat-test"))
(defalias 'erc-define-minor-mode 'define-minor-mode)
(put 'erc-define-minor-mode 'edebug-form-spec 'define-minor-mode))
- (error
+ (error
(defmacro erc-define-minor-mode (mode doc &optional init-value lighter
- keymap &rest body)
+ keymap &rest body)
"Define a minor mode like in Emacs."
;; Deal with at least /some/ keywords.
;; the rest don't seem to be as important.
(let (keyw globalp group)
(while (keywordp (setq keyw (car body)))
- (setq body (cdr body))
- (case keyw
- (:global (setq globalp (pop body)))
- (:group (setq group (pop body)))
- (t (pop body))))
+ (setq body (cdr body))
+ (case keyw
+ (:global (setq globalp (pop body)))
+ (:group (setq group (pop body)))
+ (t (pop body))))
`(progn
- (if ,group
- (defcustom ,mode ,init-value
- "Non-nil if the corresponding mode is enabled."
- :group ,group
- :type 'boolean)
- (defvar ,mode ,init-value
- "Non-nil if the corresponding mode is enabled."))
- (unless ,globalp
- (make-variable-buffer-local ',mode))
- (defun ,mode (&optional arg)
- ,doc
- (interactive)
- (setq ,mode (if arg
- (> (prefix-numeric-value arg) 0)
- (not ,mode)))
- ,@body
- ,mode)
- (add-minor-mode ,mode ,lighter ,keymap))))
+ (if ,group
+ (defcustom ,mode ,init-value
+ "Non-nil if the corresponding mode is enabled."
+ :group ,group
+ :type 'boolean)
+ (defvar ,mode ,init-value
+ "Non-nil if the corresponding mode is enabled."))
+ (unless ,globalp
+ (make-variable-buffer-local ',mode))
+ (defun ,mode (&optional arg)
+ ,doc
+ (interactive)
+ (setq ,mode (if arg
+ (> (prefix-numeric-value arg) 0)
+ (not ,mode)))
+ ,@body
+ ,mode)
+ (add-minor-mode ,mode ,lighter ,keymap))))
(put 'erc-define-minor-mode 'edebug-form-spec
'(&define name stringp
[&optional sexp sexp &or consp symbolp]
@@ -140,12 +140,22 @@ See `erc-encoding-coding-alist'."
(if (not (fboundp 'field-end))
(defun field-end (pos &optional ignored)
(save-excursion
- (let ((field (get-text-property pos 'field)))
- (goto-char pos)
- (while (and field
- (eq field (get-text-property (point) 'field)))
- (forward-char))
- (point)))))
+ (let ((field (get-text-property pos 'field)))
+ (goto-char pos)
+ (while (and field
+ (eq field (get-text-property (point) 'field)))
+ (forward-char))
+ (point)))))
+
+(if (not (fboundp 'propertize))
+ (defun erc-propertize (string &rest props)
+ (let ((string (copy-sequence string)))
+ (while props
+ (put-text-property 0 (length string)
+ (nth 0 props) (nth 1 props) string)
+ (setq props (cddr props)))
+ string))
+ (defalias 'erc-propertize 'propertize))
;;; XEmacs does not have `view-mode-enter', but its `view-mode' has a
;;; similar argument list. And we need this in erc-match.el.
@@ -158,9 +168,11 @@ See `erc-encoding-coding-alist'."
;; But note Emacs view-mode: (view-mode &optional ARG)
-(when (and (fboundp 'view-mode)
+(defalias 'erc-view-mode-enter
+ (if (and (fboundp 'view-mode)
(not (fboundp 'view-mode-enter)))
- (defalias 'view-mode-enter 'view-mode))
+ 'view-mode
+ 'view-mode-enter))
;;; XEmacs has `replace-in-string', Emacs has `replace-regexp-in-string':
@@ -171,11 +183,13 @@ See `erc-encoding-coding-alist'."
(replace-in-string string regexp rep literal))))
;;; Done!
-;; XEmacs has a string representation of the build time. Really!
+;; XEmacs has a string representation of the build time. It's
+;; possible for date-to-time to throw an "invalid date" error, so
+;; we'll just use a string instead of a time.
(setq erc-emacs-build-time
(if (stringp emacs-build-time)
- (date-to-time emacs-build-time)
- emacs-build-time))
+ emacs-build-time
+ (format-time-string "%Y-%m-%d" emacs-build-time)))
;; XEmacs' `replace-match' does not replace matching subexpressions in
strings.
(defun erc-replace-match-subexpression-in-string
@@ -185,9 +199,9 @@ MATCH is the text which matched the sube
START is the beginning position of the last match (see `match-beginning').
See `replace-match' for explanations of FIXEDCASE and LITERAL."
(cond ((featurep 'xemacs)
- (string-match match string start)
- (replace-match newtext fixedcase literal string))
- (t (replace-match newtext fixedcase literal string subexp))))
+ (string-match match string start)
+ (replace-match newtext fixedcase literal string))
+ (t (replace-match newtext fixedcase literal string subexp))))
;; If a version of Emacs or XEmacs does not have gnus or tramp, they
;; will not have the format-spec library. We deal with this by
@@ -204,22 +218,22 @@ to values."
(insert format)
(goto-char (point-min))
(while (search-forward "%" nil t)
- (cond
- ;; Quoted percent sign.
- ((eq (char-after) ?%)
- (delete-char 1))
- ;; Valid format spec.
- ((looking-at "\\([-0-9.]*\\)\\([a-zA-Z]\\)")
- (let* ((num (match-string 1))
- (spec (string-to-char (match-string 2)))
- (val (cdr (assq spec specification))))
- (delete-region (1- (match-beginning 0)) (match-end 0))
- (unless val
- (error "Invalid format character: %s" spec))
- (insert (format (concat "%" num "s") val))))
- ;; Signal an error on bogus format strings.
- (t
- (error "Invalid format string"))))
+ (cond
+ ;; Quoted percent sign.
+ ((eq (char-after) ?%)
+ (delete-char 1))
+ ;; Valid format spec.
+ ((looking-at "\\([-0-9.]*\\)\\([a-zA-Z]\\)")
+ (let* ((num (match-string 1))
+ (spec (string-to-char (match-string 2)))
+ (val (cdr (assq spec specification))))
+ (delete-region (1- (match-beginning 0)) (match-end 0))
+ (unless val
+ (error "Invalid format character: %s" spec))
+ (insert (format (concat "%" num "s") val))))
+ ;; Signal an error on bogus format strings.
+ (t
+ (error "Invalid format string"))))
(buffer-string)))
(defun format-spec-make (&rest pairs)
@@ -228,21 +242,26 @@ PAIRS is a list where every other elemen
starting with a character."
(let (alist)
(while pairs
- (unless (cdr pairs)
- (error "Invalid list of pairs"))
- (push (cons (car pairs) (cadr pairs)) alist)
- (setq pairs (cddr pairs)))
+ (unless (cdr pairs)
+ (error "Invalid list of pairs"))
+ (push (cons (car pairs) (cadr pairs)) alist)
+ (setq pairs (cddr pairs)))
(nreverse alist)))))
;; Emacs has `cancel-timer', but XEmacs uses `delete-itimer'.
(defun erc-cancel-timer (timer)
(cond ((fboundp 'cancel-timer)
- (cancel-timer timer))
- ((fboundp 'delete-itimer)
- (delete-itimer timer))
- (t
- (error "Cannot find `cancel-timer' variant"))))
+ (cancel-timer timer))
+ ((fboundp 'delete-itimer)
+ (delete-itimer timer))
+ (t
+ (error "Cannot find `cancel-timer' variant"))))
(provide 'erc-compat)
;;; erc-compat.el ends here
+;;
+;; Local Variables:
+;; indent-tabs-mode: t
+;; tab-width: 8
+;; End:
1.5 +10 -4 XEmacs/packages/xemacs-packages/erc/erc-complete.el
Index: erc-complete.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-complete.el,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- erc-complete.el 2005/04/10 14:47:35 1.4
+++ erc-complete.el 2005/10/15 18:15:27 1.5
@@ -28,7 +28,7 @@
;; pcomplete. There is no autoload cookie in this file. If you want
;; to use the code in this file, add the following to your ~/.emacs:
-;; (autoload 'erc-complete "erc-complete" "Complete nick at
point." t)
+;; (autoload 'erc-complete "erc-complete" "Complete nick at
point." t)
;;; Code:
@@ -36,7 +36,7 @@
(require 'erc-match); for erc-pals
(require 'hippie-exp); for the hippie expand stuff
-(defconst erc-complete-version "$Revision: 1.16 $"
+(defconst erc-complete-version "$Revision: 1.18 $"
"ERC complete revision.")
;;;###autoload
@@ -88,7 +88,7 @@ typing \"f o TAB\" will directly give yo
`erc-nick-completion'."
(delete
(erc-current-nick)
- (mapcar (function car) channel-members)))
+ (mapcar (function car) (erc-get-channel-user-list))))
(defcustom erc-nick-completion-postfix ": "
"*When `erc-complete' is used in the first word after the prompt,
@@ -112,7 +112,8 @@ The type of completion depends on `erc-n
(try-complete-erc-nick old erc-pals))
((eq erc-nick-completion 'all)
(try-complete-erc-nick old (append
- (mapcar (function car) channel-members)
+ (mapcar (function car)
+ (erc-get-channel-user-list))
(erc-command-list))))
((functionp erc-nick-completion)
(try-complete-erc-nick old (funcall erc-nick-completion)))
@@ -214,3 +215,8 @@ Window configurations are stored in
(provide 'erc-complete)
;;; erc-complete.el ends here
+;;
+;; Local Variables:
+;; indent-tabs-mode: t
+;; tab-width: 8
+;; End:
1.8 +297 -284 XEmacs/packages/xemacs-packages/erc/erc-dcc.el
Index: erc-dcc.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-dcc.el,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- erc-dcc.el 2005/04/10 14:47:35 1.7
+++ erc-dcc.el 2005/10/15 18:15:27 1.8
@@ -53,7 +53,7 @@
(require 'erc)
-(defconst erc-dcc-version "$Revision: 1.88 $"
+(defconst erc-dcc-version "$Revision: 1.90 $"
"ERC DCC revision")
(defgroup erc-dcc nil
@@ -101,9 +101,9 @@ IRC users."
"Add a new entry of type TYPE to `erc-dcc-list' and return it."
(car
(setq erc-dcc-list
- (cons
- (append (list :nick nick :type type :peer peer :parent parent) args)
- erc-dcc-list))))
+ (cons
+ (append (list :nick nick :type type :peer peer :parent parent) args)
+ erc-dcc-list))))
;; This function takes all the usual args as open-network-stream, plus one
;; more: the entry data from erc-dcc-list for this particular process.
@@ -164,31 +164,31 @@ compared with `erc-nick-equal-p' which i
;; for each element in erc-dcc-list
(while (and list (not result))
(let ((elt (car list))
- (prem args)
- (cont t))
- ;; loop through the constraints
- (while (and prem cont)
- (let ((prop (car prem))
- (val (cadr prem)))
- (setq prem (cddr prem)
+ (prem args)
+ (cont t))
+ ;; loop through the constraints
+ (while (and prem cont)
+ (let ((prop (car prem))
+ (val (cadr prem)))
+ (setq prem (cddr prem)
;; plist-member is a predicate in xemacs
- test (and (plist-member elt prop)
+ test (and (plist-member elt prop)
(plist-get elt prop)))
- ;; if the property exists and is equal, we continue, else, try the
- ;; next element of the list
- (or (and (eq prop :nick) (string-match "!" val)
- test (string-equal test val))
- (and (eq prop :nick)
- test val
- (erc-nick-equal-p
- (erc-extract-nick test)
- (erc-extract-nick val)))
+ ;; if the property exists and is equal, we continue, else, try the
+ ;; next element of the list
+ (or (and (eq prop :nick) (string-match "!" val)
+ test (string-equal test val))
+ (and (eq prop :nick)
+ test val
+ (erc-nick-equal-p
+ (erc-extract-nick test)
+ (erc-extract-nick val)))
;; not a nick
- (eq test val)
- (setq cont nil))))
- (if cont
- (setq result elt)
- (setq list (cdr list)))))
+ (eq test val)
+ (setq cont nil))))
+ (if cont
+ (setq result elt)
+ (setq list (cdr list)))))
result))
;; msa wrote this nifty little frob to convert an n-byte integer to a packed
@@ -196,7 +196,7 @@ compared with `erc-nick-equal-p' which i
(defun erc-pack-int (value count)
(if (> count 0)
(concat (erc-pack-int (/ value 256) (1- count))
- (char-to-string (% value 256)))
+ (char-to-string (% value 256)))
""))
(defun erc-unpack-int (str)
@@ -212,8 +212,8 @@ compared with `erc-nick-equal-p' which i
(defconst erc-dcc-ipv4-regexp
(concat "^"
- (mapconcat #'identity (make-list 4 "\\([0-9]\\{1,3\\}\\)")
"\\.")
- "$"))
+ (mapconcat #'identity (make-list 4 "\\([0-9]\\{1,3\\}\\)")
"\\.")
+ "$"))
(defun erc-ip-to-decimal (ip)
"Convert IP address to its decimal representation.
@@ -222,19 +222,19 @@ Argument IP is the address as a string.
(if (not (string-match erc-dcc-ipv4-regexp ip))
(error "Not an IP address")
(let* ((ips (mapcar
- (lambda (str)
- (let ((n (string-to-number str)))
- (if (and (>= n 0) (< n 256))
- n
- (error "%d out of range" n))))
- (split-string ip "\\.")))
+ (lambda (str)
+ (let ((n (string-to-number str)))
+ (if (and (>= n 0) (< n 256))
+ n
+ (error "%d out of range" n))))
+ (split-string ip "\\.")))
(res (+ (* (car ips) 16777216.0)
(* (nth 1 ips) 65536.0)
(* (nth 2 ips) 256.0)
(nth 3 ips))))
(if (interactive-p)
- (message "%s is %.0f" ip res)
- (format "%.0f" res)))))
+ (message "%s is %.0f" ip res)
+ (format "%.0f" res)))))
(defun erc-decimal-to-ip (dec)
"Convert a decimal representation DEC to an IP address.
@@ -258,8 +258,8 @@ Should be set to a string or nil, if nil
host interface to use will be attempted."
:group 'erc-dcc
:type (list 'choice (list 'const :tag "Auto-detect" nil)
- (list 'string :tag "IP-address"
- :valid-regexp erc-dcc-ipv4-regexp)))
+ (list 'string :tag "IP-address"
+ :valid-regexp erc-dcc-ipv4-regexp)))
(defcustom erc-dcc-send-request 'ask
"*How to treat incoming DCC Send requests.
@@ -277,8 +277,8 @@ host interface to use will be attempted.
(defun erc-dcc-host ()
"Determine the IP address we are using.
If variable `erc-dcc-host' is non-nil, use it. Otherwise call
-`erc-dcc-get-host' on the erc-process."
- (or erc-dcc-host (erc-dcc-get-host erc-process)
+`erc-dcc-get-host' on the erc-server-process."
+ (or erc-dcc-host (erc-dcc-get-host erc-server-process)
(error "Unable to determine local address")))
(defcustom erc-dcc-port-range nil
@@ -288,8 +288,8 @@ If set to a cons, it specifies a range o
:type '(choice
(const :tag "Any port" nil)
(cons :tag "Port range"
- (integer :tag "Lower port")
- (integer :tag "Upper port"))))
+ (integer :tag "Lower port")
+ (integer :tag "Upper port"))))
(defcustom erc-dcc-auto-masks nil
"List of regexps matching user identifiers whose DCC send offers should be
@@ -333,7 +333,7 @@ the accepted connection."
(erc-log (format "(erc-dcc-server-accept): server %s client %s message %s"
server client message))
(when (and (string-match "^accept from " message)
- (processp server) (processp client))
+ (processp server) (processp client))
(let ((elt (erc-dcc-member :peer server)))
;; change the entry in erc-dcc-list from the listening process to the
;; accepted process
@@ -358,48 +358,48 @@ where FOO is one of CLOSE, GET, SEND, LI
(when cmd
(let ((fn (intern-soft (concat "erc-dcc-do-" (upcase cmd)
"-command"))))
(if fn
- (apply fn erc-process args)
- (erc-display-message
- nil 'notice 'active
- 'dcc-command-undefined ?c cmd)
- (apropos "erc-dcc-do-.*-command")
- t))))
+ (apply fn erc-server-process args)
+ (erc-display-message
+ nil 'notice 'active
+ 'dcc-command-undefined ?c cmd)
+ (apropos "erc-dcc-do-.*-command")
+ t))))
;;;###autoload
(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))
- (remove-if-not
- (lambda (elt)
- (eq (plist-get elt :type) 'CHAT)) erc-dcc-list)))
+ (remove-if-not
+ (lambda (elt)
+ (eq (plist-get elt :type) 'CHAT)) erc-dcc-list)))
(close (remove-duplicates
- (mapcar (lambda (elt) (symbol-name (plist-get elt :type)))
- erc-dcc-list) :test 'string=))
+ (mapcar (lambda (elt) (symbol-name (plist-get elt :type)))
+ erc-dcc-list) :test 'string=))
(get (mapcar #'erc-dcc-nick
- (remove-if-not
- (lambda (elt)
- (eq (plist-get elt :type) 'GET)) erc-dcc-list)))
+ (remove-if-not
+ (lambda (elt)
+ (eq (plist-get elt :type) 'GET)) erc-dcc-list)))
(send (pcomplete-erc-all-nicks))))
(pcomplete-here
(case (intern (downcase (pcomplete-arg 2)))
(get (mapcar (lambda (elt) (plist-get elt :file))
- (remove-if-not
- (lambda (elt)
- (and (eq (plist-get elt :type) 'GET)
- (erc-nick-equal-p (erc-extract-nick
- (plist-get elt :nick))
- (pcomplete-arg 1))))
- erc-dcc-list)))
+ (remove-if-not
+ (lambda (elt)
+ (and (eq (plist-get elt :type) 'GET)
+ (erc-nick-equal-p (erc-extract-nick
+ (plist-get elt :nick))
+ (pcomplete-arg 1))))
+ erc-dcc-list)))
(close (mapcar #'erc-dcc-nick
- (remove-if-not
- (lambda (elt)
- (eq (plist-get elt :type)
- (intern (upcase (pcomplete-arg 1)))))
- erc-dcc-list)))
+ (remove-if-not
+ (lambda (elt)
+ (eq (plist-get elt :type)
+ (intern (upcase (pcomplete-arg 1)))))
+ erc-dcc-list)))
(send (pcomplete-entries)))))
(defun erc-dcc-do-CHAT-command (proc &optional nick)
@@ -408,12 +408,12 @@ where FOO is one of CLOSE, GET, SEND, LI
(if (and elt (not (processp (plist-get elt :peer))))
;; accept an existing chat offer
;; FIXME: perhaps /dcc accept like other clients?
- (progn (erc-dcc-chat-accept elt erc-process)
+ (progn (erc-dcc-chat-accept elt erc-server-process)
(erc-display-message
nil 'notice 'active
'dcc-chat-accept ?n nick)
t)
- (erc-dcc-chat nick erc-process)
+ (erc-dcc-chat nick erc-server-process)
(erc-display-message
nil 'notice 'active
'dcc-chat-offer ?n nick)
@@ -424,10 +424,10 @@ where FOO is one of CLOSE, GET, SEND, LI
type and nick are optional."
;; FIXME, should also work if only nick is specified
(when (string-match (concat "^\\s-*\\(\\S-+\\)? *\\("
- erc-valid-nick-regexp "\\)?\\s-*$") line)
+ erc-valid-nick-regexp "\\)?\\s-*$") line)
(let ((type (when (match-string 1 line)
- (intern (upcase (match-string 1 line)))))
- (nick (match-string 2 line))
+ (intern (upcase (match-string 1 line)))))
+ (nick (match-string 2 line))
(ret t))
(while ret
(if nick
@@ -435,36 +435,36 @@ type and nick are optional."
(setq ret (erc-dcc-member :type type)))
(when ret
;; found a match - delete process if it exists.
- (and (processp (plist-get ret :peer))
- (delete-process (plist-get ret :peer)))
- (setq erc-dcc-list (delq ret erc-dcc-list))
- (erc-display-message
- nil 'notice 'active
- 'dcc-closed
- ?T (plist-get ret :type)
- ?n (erc-extract-nick (plist-get ret :nick))))))
+ (and (processp (plist-get ret :peer))
+ (delete-process (plist-get ret :peer)))
+ (setq erc-dcc-list (delq ret erc-dcc-list))
+ (erc-display-message
+ nil 'notice 'active
+ 'dcc-closed
+ ?T (plist-get ret :type)
+ ?n (erc-extract-nick (plist-get ret :nick))))))
t))
(defun erc-dcc-do-GET-command (proc nick &optional file)
(let* ((elt (erc-dcc-member :nick nick :type 'GET))
- (filename (or file (plist-get elt :file) "unknown")))
+ (filename (or file (plist-get elt :file) "unknown")))
(if elt
(let* ((file (read-file-name
- (format "Local filename (default %s): "
- (file-name-nondirectory filename))
- (or erc-dcc-get-default-directory
- default-directory)
- (expand-file-name (file-name-nondirectory filename)
- (or erc-dcc-get-default-directory
- default-directory)))))
+ (format "Local filename (default %s): "
+ (file-name-nondirectory filename))
+ (or erc-dcc-get-default-directory
+ default-directory)
+ (expand-file-name (file-name-nondirectory filename)
+ (or erc-dcc-get-default-directory
+ default-directory)))))
(cond ((file-exists-p file)
(if (yes-or-no-p (format "File %s exists. Overwrite? "
- file))
+ file))
(erc-dcc-get-file elt file proc)
(erc-display-message
- nil '(notice error) proc
- 'dcc-get-cmd-aborted
- ?n nick ?f filename)))
+ nil '(notice error) proc
+ 'dcc-get-cmd-aborted
+ ?n nick ?f filename)))
(t
(erc-dcc-get-file elt file proc))))
(erc-display-message
@@ -484,32 +484,34 @@ It lists the current state of `erc-dcc-l
'dcc-list-line)
(while alist
(setq elt (car alist)
- alist (cdr alist))
+ alist (cdr alist))
(setq size (or (and (plist-member elt :size)
(plist-get elt :size))
""))
(setq size
- (cond ((null size) "")
- ((numberp size) (number-to-string size))
- ((string= size "") "unknown")))
+ (cond ((null size) "")
+ ((numberp size) (number-to-string size))
+ ((string= size "") "unknown")))
(erc-display-message
nil 'notice 'active
'dcc-list-item
?n (erc-dcc-nick elt)
?t (plist-get elt :type)
?a (if (processp (plist-get elt :peer))
- (process-status (plist-get elt :peer))
- "no")
+ (process-status (plist-get elt :peer))
+ "no")
?s (concat size
- (if (and (eq 'GET (plist-get elt :type))
- (plist-member elt :file)
- (buffer-live-p (get-buffer (plist-get elt :file)))
- (plist-member elt :size))
- (concat " (" (number-to-string
- (* 100 (/ (buffer-size (get-buffer (plist-get elt :file)))
- (plist-get elt :size))))
- "%)")))
+ (if (and (eq 'GET (plist-get elt :type))
+ (plist-member elt :file)
+ (buffer-live-p (get-buffer (plist-get elt :file)))
+ (plist-member elt :size))
+ (concat " (" (number-to-string
+ (* 100
+ (/ (buffer-size
+ (get-buffer (plist-get elt :file)))
+ (plist-get elt :size))))
+ "%)")))
?f (or (and (plist-member elt :file) (plist-get elt :file)) "")))
(erc-display-message
nil 'notice 'active
@@ -520,10 +522,10 @@ It lists the current state of `erc-dcc-l
"Offer FILE to NICK by sending a ctcp dcc send message."
(if (file-exists-p file)
(progn
- (erc-display-message
- nil 'notice 'active
- 'dcc-send-offer ?n nick ?f file)
- (erc-dcc-send-file nick file) t)
+ (erc-display-message
+ nil 'notice 'active
+ 'dcc-send-offer ?n nick ?f file)
+ (erc-dcc-send-file nick file) t)
(erc-display-message nil '(notice error) proc "File not found") t))
;;; Server message handling (i.e. messages from remote users)
@@ -542,7 +544,7 @@ It lists the current state of `erc-dcc-l
It examines the DCC subcommand, and calls the appropriate routine for
that subcommand."
(let* ((cmd (cadr (split-string query " ")))
- (handler (cdr (assoc cmd erc-dcc-query-handler-alist))))
+ (handler (cdr (assoc cmd erc-dcc-query-handler-alist))))
(if handler
(funcall handler proc query nick login host to)
;; FIXME: Send a ctcp error notice to the remote end?
@@ -568,29 +570,29 @@ It extracts the information about the dc
?r "SEND" ?n nick ?u login ?h host))
((string-match erc-dcc-ctcp-query-send-regexp query)
(let ((filename (match-string 1 query))
- (ip (erc-decimal-to-ip (match-string 2 query)))
- (port (match-string 3 query))
- (size (match-string 4 query)))
- ;; FIXME: a warning really should also be sent
- ;; if the ip address != the host the dcc sender is on.
- (erc-display-message
- nil 'notice proc
- 'dcc-send-offered
- ?f filename ?n nick ?u login ?h host
- ?s (if (string= size "") "unknown" size))
- (and (< (string-to-int port) 1025)
- (erc-display-message
- nil 'notice proc
- 'dcc-privileged-port
- ?p port))
- (erc-dcc-list-add
- 'GET (format "%s!%s@%s" nick login host)
- nil proc
- :ip ip :port port :file filename
- :size (string-to-int size))
- (if (and (eq erc-dcc-send-request 'auto)
+ (ip (erc-decimal-to-ip (match-string 2 query)))
+ (port (match-string 3 query))
+ (size (match-string 4 query)))
+ ;; FIXME: a warning really should also be sent
+ ;; if the ip address != the host the dcc sender is on.
+ (erc-display-message
+ nil 'notice proc
+ 'dcc-send-offered
+ ?f filename ?n nick ?u login ?h host
+ ?s (if (string= size "") "unknown" size))
+ (and (< (string-to-number port) 1025)
+ (erc-display-message
+ nil 'notice proc
+ 'dcc-privileged-port
+ ?p port))
+ (erc-dcc-list-add
+ 'GET (format "%s!%s@%s" nick login host)
+ nil proc
+ :ip ip :port port :file filename
+ :size (string-to-number size))
+ (if (and (eq erc-dcc-send-request 'auto)
(erc-dcc-auto-mask-p (format "\"%s!%s@%s\"" nick
login host)))
- (erc-dcc-get-file (car erc-dcc-list) filename proc))))
+ (erc-dcc-get-file (car erc-dcc-list) filename proc))))
(t
(erc-display-message
nil 'notice proc
@@ -610,6 +612,14 @@ match, returns that regexp and nil other
(defconst erc-dcc-ctcp-query-chat-regexp
"^DCC CHAT +chat +\\([0-9]+\\) +\\([0-9]+\\)")
+(defcustom erc-dcc-chat-request 'ask
+ "*How to treat incoming DCC Chat requests.
+'ask - Report the Chat request, and wait for the user to manually accept it
+'auto - Automatically accept the request and open a new chat window
+'ignore - Ignore incoming DCC chat requests completely."
+ :group 'erc-dcc
+ :type '(choice (const ask) (const auto) (const ignore)))
+
(defun erc-dcc-handle-ctcp-chat (proc query nick login host to)
(unless (eq erc-dcc-chat-request 'ignore)
(cond
@@ -622,32 +632,32 @@ match, returns that regexp and nil other
;; We need to use let* here, since erc-dcc-member might clutter
;; the match value.
(let* ((ip (erc-decimal-to-ip (match-string 1 query)))
- (port (match-string 2 query))
- (elt (erc-dcc-member :nick nick :type 'CHAT)))
- ;; FIXME: A warning really should also be sent if the ip
- ;; address != the host the dcc sender is on.
- (erc-display-message
- nil 'notice proc
- 'dcc-chat-offered
- ?n nick ?u login ?h host ?p port)
- (and (< (string-to-int port) 1025)
- (erc-display-message
- nil 'notice proc
- 'dcc-privileged-port ?p port))
- (cond (elt
- ;; XXX: why are we updating ip/port on the existing connection?
- (setq elt (plist-put (plist-put elt :port port) :ip ip))
- (erc-display-message
- nil 'notice proc
- 'dcc-chat-discarded ?n nick ?u login ?h host))
- (t
- (erc-dcc-list-add
- 'CHAT (format "%s!%s@%s" nick login host)
- nil proc
- :ip ip :port port)))
- (if (eq erc-dcc-chat-request 'auto)
- (erc-dcc-chat-accept (erc-dcc-member :nick nick :type 'CHAT)
- proc))))
+ (port (match-string 2 query))
+ (elt (erc-dcc-member :nick nick :type 'CHAT)))
+ ;; FIXME: A warning really should also be sent if the ip
+ ;; address != the host the dcc sender is on.
+ (erc-display-message
+ nil 'notice proc
+ 'dcc-chat-offered
+ ?n nick ?u login ?h host ?p port)
+ (and (< (string-to-number port) 1025)
+ (erc-display-message
+ nil 'notice proc
+ 'dcc-privileged-port ?p port))
+ (cond (elt
+ ;; XXX: why are we updating ip/port on the existing connection?
+ (setq elt (plist-put (plist-put elt :port port) :ip ip))
+ (erc-display-message
+ nil 'notice proc
+ 'dcc-chat-discarded ?n nick ?u login ?h host))
+ (t
+ (erc-dcc-list-add
+ 'CHAT (format "%s!%s@%s" nick login host)
+ nil proc
+ :ip ip :port port)))
+ (if (eq erc-dcc-chat-request 'auto)
+ (erc-dcc-chat-accept (erc-dcc-member :nick nick :type 'CHAT)
+ proc))))
(t
(erc-display-message
nil '(notice error) proc
@@ -671,90 +681,90 @@ unconfirmed."
:group 'erc-dcc
:type '(choice (const nil) integer))
+(defsubst erc-dcc-get-parent (proc)
+ (plist-get (erc-dcc-member :peer proc) :parent))
+
(defun erc-dcc-send-block (proc)
"Send one block of data.
PROC is the process-object of the DCC connection. Returns the number of
bytes sent."
(let* ((elt (erc-dcc-member :peer proc))
- (confirmed-marker (plist-get elt :sent))
- (sent-marker (plist-get elt :sent)))
+ (confirmed-marker (plist-get elt :sent))
+ (sent-marker (plist-get elt :sent)))
(with-current-buffer (process-buffer proc)
(when erc-verbose-dcc
- (erc-display-message
- nil 'notice (erc-dcc-get-parent proc)
- (format "DCC: Confirmed %d, sent %d, sending block now"
- (- confirmed-marker (point-min))
- (- sent-marker (point-min)))))
+ (erc-display-message
+ nil 'notice (erc-dcc-get-parent proc)
+ (format "DCC: Confirmed %d, sent %d, sending block now"
+ (- confirmed-marker (point-min))
+ (- sent-marker (point-min)))))
(let* ((end (min (+ sent-marker erc-dcc-block-size)
- (point-max)))
- (string (buffer-substring-no-properties sent-marker end)))
- (when (< sent-marker end)
- (set-marker sent-marker end)
- (process-send-string proc string))
- (length string)))))
+ (point-max)))
+ (string (buffer-substring-no-properties sent-marker end)))
+ (when (< sent-marker end)
+ (set-marker sent-marker end)
+ (process-send-string proc string))
+ (length string)))))
(defun erc-dcc-send-filter (proc string)
(assert (= (% (length string) 4) 0))
(let* ((size (erc-unpack-int (substring string (- (length string) 4))))
- (elt (erc-dcc-member :peer proc))
- (parent (plist-get elt :parent))
- (sent-marker (plist-get elt :sent))
- (confirmed-marker (plist-get elt :confirmed)))
+ (elt (erc-dcc-member :peer proc))
+ (parent (plist-get elt :parent))
+ (sent-marker (plist-get elt :sent))
+ (confirmed-marker (plist-get elt :confirmed)))
(with-current-buffer (process-buffer proc)
(set-marker confirmed-marker (+ (point-min) size))
(cond
((and (= confirmed-marker sent-marker)
- (= confirmed-marker (point-max)))
- (erc-display-message
- nil 'notice parent
- 'dcc-send-finished
- ?n (plist-get elt :nick)
- ?f buffer-file-name
- ?s (number-to-string (- sent-marker (point-min))))
- (setq erc-dcc-list (delete elt erc-dcc-list))
- (set-buffer-modified-p nil)
- (kill-buffer (current-buffer))
- (delete-process proc))
+ (= confirmed-marker (point-max)))
+ (erc-display-message
+ nil 'notice parent
+ 'dcc-send-finished
+ ?n (plist-get elt :nick)
+ ?f buffer-file-name
+ ?s (number-to-string (- sent-marker (point-min))))
+ (setq erc-dcc-list (delete elt erc-dcc-list))
+ (set-buffer-modified-p nil)
+ (kill-buffer (current-buffer))
+ (delete-process proc))
((<= confirmed-marker sent-marker)
- (while (and (< (- sent-marker confirmed-marker)
- (or erc-dcc-pump-bytes
- erc-dcc-block-size))
- (> (erc-dcc-send-block proc) 0))))
+ (while (and (< (- sent-marker confirmed-marker)
+ (or erc-dcc-pump-bytes
+ erc-dcc-block-size))
+ (> (erc-dcc-send-block proc) 0))))
((> confirmed-marker sent-marker)
- (erc-display-message
- nil 'notice parent
- (format "DCC: Client confirmed too much!"))
- (delete-process proc))))))
+ (erc-display-message
+ nil 'notice parent
+ (format "DCC: Client confirmed too much!"))
+ (delete-process proc))))))
(defcustom erc-dcc-send-connect-hook
'((lambda (proc)
(erc-display-message
nil 'notice (erc-dcc-get-parent proc)
(format "DCC: SEND connect from %s"
- (format-network-address (process-contact proc :remote)))))
+ (format-network-address (process-contact proc :remote)))))
erc-dcc-send-block)
"*Hook run whenever the remote end of a DCC SEND offer connected to your
listening port."
:group 'erc-dcc
:type 'hook)
-(defsubst erc-dcc-get-parent (proc)
- (plist-get (erc-dcc-member :peer proc) :parent))
-
(defun erc-dcc-nick (plist)
"Extract the nickname portion of the :nick property value in PLIST."
(erc-extract-nick (plist-get plist :nick)))
(defun erc-dcc-send-sentinel (proc event)
(let* ((elt (erc-dcc-member :peer proc))
- (buf (marker-buffer (plist-get elt :sent))))
+ (buf (marker-buffer (plist-get elt :sent))))
(cond
((string-match "^open from " event)
(when elt
- (with-current-buffer buf
- (set-process-buffer proc buf)
- (setq erc-dcc-entry-data elt))
- (run-hook-with-args 'erc-dcc-send-connect-hook proc))))))
+ (with-current-buffer buf
+ (set-process-buffer proc buf)
+ (setq erc-dcc-entry-data elt))
+ (run-hook-with-args 'erc-dcc-send-connect-hook proc))))))
(defun erc-dcc-find-file (file)
(with-current-buffer (generate-new-buffer (file-name-nondirectory file))
@@ -772,25 +782,28 @@ listening port."
"Open a socket for incoming connections, and send a CTCP send request to the
other client."
(interactive "sNick: \nfFile: ")
- (when (null pproc) (if (processp erc-process) (setq pproc erc-process)
- (error "Can not find parent process")))
+ (when (null pproc) (if (processp erc-server-process)
+ (setq pproc erc-server-process)
+ (error "Can not find parent process")))
(if (featurep 'make-network-process)
(let* ((buffer (erc-dcc-find-file file))
- (size (buffer-size buffer))
- (start (with-current-buffer buffer
- (set-marker (make-marker) (point-min))))
- (sproc (erc-dcc-server "dcc-send"
- 'erc-dcc-send-filter
- 'erc-dcc-send-sentinel))
- (contact (process-contact sproc)))
- (erc-dcc-list-add
- 'SEND nick sproc pproc
- :file file :size size
- :sent start :confirmed (copy-marker start))
- (process-send-string
- pproc (format "PRIVMSG %s :\C-aDCC SEND %s %s %d %d\C-a\n"
- nick (erc-dcc-file-to-name file)
- (erc-ip-to-decimal (nth 0 contact)) (nth 1 contact) size)))
+ (size (buffer-size buffer))
+ (start (with-current-buffer buffer
+ (set-marker (make-marker) (point-min))))
+ (sproc (erc-dcc-server "dcc-send"
+ 'erc-dcc-send-filter
+ 'erc-dcc-send-sentinel))
+ (contact (process-contact sproc)))
+ (erc-dcc-list-add
+ 'SEND nick sproc pproc
+ :file file :size size
+ :sent start :confirmed (copy-marker start))
+ (process-send-string
+ pproc (format "PRIVMSG %s :\C-aDCC SEND %s %s %d %d\C-a\n"
+ nick (erc-dcc-file-to-name file)
+ (erc-ip-to-decimal (nth 0 contact))
+ (nth 1 contact)
+ size)))
(error "`make-network-process' not supported by your emacs.")))
;;; GET handling
@@ -811,22 +824,22 @@ filter and a process sentinel, and makin
;; XEmacs change: We don't have `set-buffer-multibyte', setting
;; coding system to 'binary below takes care of us.
(when (fboundp 'set-buffer-multibyte)
- (set-buffer-multibyte nil))
+ (set-buffer-multibyte nil))
(setq mode-line-process '(":%s")
- buffer-file-type t
- buffer-read-only t)
+ buffer-file-type t
+ buffer-read-only t)
(set-visited-file-name file)
- (setq erc-process parent-proc
- erc-dcc-entry-data entry)
+ (setq erc-server-process parent-proc
+ erc-dcc-entry-data entry)
(setq erc-dcc-byte-count 0)
(setq proc
- (funcall erc-dcc-connect-function
- "dcc-get" buffer
- (plist-get entry :ip)
- (string-to-int (plist-get entry :port))
- entry))
+ (funcall erc-dcc-connect-function
+ "dcc-get" buffer
+ (plist-get entry :ip)
+ (string-to-number (plist-get entry :port))
+ entry))
(set-process-buffer proc buffer)
;; The following two lines make saving as-is work under Windows
(set-process-coding-system proc 'binary 'binary)
@@ -851,14 +864,14 @@ rather than every 1024 byte block, but n
(setq erc-dcc-byte-count (+ (length str) erc-dcc-byte-count))
(assert (= erc-dcc-byte-count (1- (point-max))))
(and erc-verbose-dcc
- (erc-display-message
- nil 'notice erc-process
- 'dcc-get-bytes-received
- ?f (file-name-nondirectory buffer-file-name)
- ?b (number-to-string erc-dcc-byte-count)))
+ (erc-display-message
+ nil 'notice erc-server-process
+ 'dcc-get-bytes-received
+ ?f (file-name-nondirectory buffer-file-name)
+ ?b (number-to-string erc-dcc-byte-count)))
(cond
((and (> (plist-get erc-dcc-entry-data :size) 0)
- (> erc-dcc-byte-count (plist-get erc-dcc-entry-data :size)))
+ (> erc-dcc-byte-count (plist-get erc-dcc-entry-data :size)))
(erc-display-message
nil '(error notice) 'active
'dcc-get-file-too-long
@@ -879,13 +892,13 @@ transfer is complete."
(setq buffer-read-only nil)
(setq erc-dcc-list (delete erc-dcc-entry-data erc-dcc-list))
(erc-display-message
- nil 'notice erc-process
+ nil 'notice erc-server-process
'dcc-get-complete
?f (file-name-nondirectory buffer-file-name)
?s (number-to-string (buffer-size))
?t (format "%.0f"
- (erc-time-diff (plist-get erc-dcc-entry-data :start-time)
- (erc-current-time))))
+ (erc-time-diff (plist-get erc-dcc-entry-data :start-time)
+ (erc-current-time))))
(save-buffer))
(kill-buffer (process-buffer proc))
(delete-process proc))
@@ -912,26 +925,19 @@ transfer is complete."
:group 'erc-dcc
:type 'hook)
-(defcustom erc-dcc-chat-request 'ask
- "*How to treat incoming DCC Chat requests.
-'ask - Report the Chat request, and wait for the user to manually accept it
-'auto - Automatically accept the request and open a new chat window
-'ignore - Ignore incoming DCC chat requests completely."
- :group 'erc-dcc
- :type '(choice (const ask) (const auto) (const ignore)))
-
(defun erc-cmd-CREQ (line &optional force)
"Set or get the DCC chat request flag.
Possible values are: ask, auto, ignore."
(when (string-match "^\\s-*\\(auto\\|ask\\|ignore\\)?$" line)
(let ((cmd (match-string 1 line)))
(if (stringp cmd)
- (erc-display-message
- nil 'notice 'active
- (format "Set DCC Chat requests to %S"
- (setq erc-dcc-chat-request (intern cmd))))
- (erc-display-message nil 'notice 'active
- (format "DCC Chat requests are set to %S" erc-dcc-chat-request)))
+ (erc-display-message
+ nil 'notice 'active
+ (format "Set DCC Chat requests to %S"
+ (setq erc-dcc-chat-request (intern cmd))))
+ (erc-display-message nil 'notice 'active
+ (format "DCC Chat requests are set to %S"
+ erc-dcc-chat-request)))
t)))
(defun erc-cmd-SREQ (line &optional force)
@@ -940,12 +946,13 @@ Possible values are: ask, auto, ignore."
(when (string-match "^\\s-*\\(auto\\|ask\\|ignore\\)?$" line)
(let ((cmd (match-string 1 line)))
(if (stringp cmd)
- (erc-display-message
- nil 'notice 'active
- (format "Set DCC Send requests to %S"
- (setq erc-dcc-send-request (intern cmd))))
- (erc-display-message nil 'notice 'active
- (format "DCC Send requests are set to %S" erc-dcc-send-request)))
+ (erc-display-message
+ nil 'notice 'active
+ (format "Set DCC Send requests to %S"
+ (setq erc-dcc-send-request (intern cmd))))
+ (erc-display-message nil 'notice 'active
+ (format "DCC Send requests are set to %S"
+ erc-dcc-send-request)))
t)))
(defun pcomplete/erc-mode/CREQ ()
@@ -967,10 +974,10 @@ Possible values are: ask, auto, ignore."
(interactive)
(kill-all-local-variables)
(setq mode-line-process '(":%s")
- mode-name "DCC-Chat"
- major-mode 'erc-dcc-chat-mode
- erc-send-input-line-function 'erc-dcc-chat-send-input-line
- erc-default-recipients '(dcc))
+ mode-name "DCC-Chat"
+ major-mode 'erc-dcc-chat-mode
+ erc-send-input-line-function 'erc-dcc-chat-send-input-line
+ erc-default-recipients '(dcc))
(use-local-map erc-dcc-chat-mode-map)
(run-hooks 'erc-dcc-chat-mode-hook))
@@ -988,8 +995,9 @@ is ignored."
"Open a socket for incoming connections, and send a chat request to the
other client."
(interactive "sNick: ")
- (when (null pproc) (if (processp erc-process) (setq pproc erc-process)
- (error "Can not find parent process")))
+ (when (null pproc) (if (processp erc-server-process)
+ (setq pproc erc-server-process)
+ (error "Can not find parent process")))
(let* ((sproc (erc-dcc-server "dcc-chat-out"
'erc-dcc-chat-filter
'erc-dcc-chat-sentinel))
@@ -997,8 +1005,8 @@ other client."
(erc-dcc-list-add 'OCHAT nick sproc pproc)
(process-send-string pproc
(format "PRIVMSG %s :\C-aDCC CHAT chat %s %d\C-a\n"
- nick
- (erc-ip-to-decimal (nth 0 contact)) (nth 1 contact)))))
+ nick
+ (erc-ip-to-decimal (nth 0 contact)) (nth 1 contact)))))
(defvar erc-dcc-from)
(make-variable-buffer-local 'erc-dcc-from)
@@ -1016,7 +1024,7 @@ other client."
(erc-setup-buffer buffer)
;; buffer is now the current buffer.
(erc-dcc-chat-mode)
- (setq erc-process parent-proc)
+ (setq erc-server-process parent-proc)
(setq erc-dcc-from nick)
(setq erc-dcc-entry-data entry)
(setq erc-dcc-unprocessed-output "")
@@ -1035,7 +1043,7 @@ other client."
(funcall erc-dcc-connect-function
"dcc-chat" nil
(plist-get entry :ip)
- (string-to-int (plist-get entry :port))
+ (string-to-number (plist-get entry :port))
entry))
;; XXX: connected, should we kill the ip/port properties?
(setq entry (plist-put entry :peer proc))
@@ -1047,7 +1055,7 @@ other client."
(defun erc-dcc-chat-filter (proc str)
(let ((orig-buffer (current-buffer)))
(unwind-protect
- (progn
+ (progn
(set-buffer (process-buffer proc))
(setq erc-dcc-unprocessed-output
(concat erc-dcc-unprocessed-output str))
@@ -1063,8 +1071,9 @@ other client."
(setq line (substring str posn (match-beginning 0)))
(setq posn (match-end 0))
(erc-display-message
- nil nil proc
- 'dcc-chat-privmsg ?n (propertize erc-dcc-from 'face
'erc-nick-default-face) ?m line))
+ nil nil proc
+ 'dcc-chat-privmsg ?n (propertize erc-dcc-from 'face
+ 'erc-nick-default-face) ?m line))
(setq erc-dcc-unprocessed-output (substring str posn)))))
(defun erc-dcc-chat-buffer-killed ()
@@ -1080,29 +1089,29 @@ other client."
(run-hook-with-args 'erc-dcc-chat-exit-hook proc)
(delete-process proc)
(erc-display-message
- nil 'notice erc-process
+ nil 'notice erc-server-process
'dcc-chat-ended ?n erc-dcc-from ?t (current-time-string) ?e evt)
(setq erc-dcc-entry-data (plist-put erc-dcc-entry-data :peer nil)))))
(defun erc-dcc-chat-sentinel (proc event)
(let ((buf (current-buffer))
- (elt (erc-dcc-member :peer proc)))
+ (elt (erc-dcc-member :peer proc)))
;; the sentinel is also notified when the connection is opened, so don't
;; immediately kill it again
;(message "buf %s elt %S evt %S" buf elt event)
(unwind-protect
- (if (string-match "^open from" event)
- (erc-dcc-chat-setup elt)
- (erc-dcc-chat-close event))
+ (if (string-match "^open from" event)
+ (erc-dcc-chat-setup elt)
+ (erc-dcc-chat-close event))
(set-buffer buf))))
(defun erc-dcc-no-such-nick (proc parsed)
"Detect and handle no-such-nick replies from the IRC server."
(let* ((elt (erc-dcc-member :nick (second (erc-response.command-args parsed))
:parent proc))
- (peer (plist-get elt :peer)))
+ (peer (plist-get elt :peer)))
(when (or (and (processp peer) (not (eq (process-status peer) 'open)))
- elt)
+ elt)
;; Since we already created an entry before sending the CTCP
;; message, we now remove it, if it doesn't point to a process
;; which is already open.
@@ -1115,3 +1124,7 @@ other client."
(provide 'erc-dcc)
;;; erc-dcc.el ends here
+;;
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; End:
1.8 +8 -8 XEmacs/packages/xemacs-packages/erc/erc-ezbounce.el
Index: erc-ezbounce.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-ezbounce.el,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- erc-ezbounce.el 2005/04/10 14:47:35 1.7
+++ erc-ezbounce.el 2005/10/15 18:15:28 1.8
@@ -16,9 +16,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -28,7 +28,7 @@
(require 'erc)
-(defconst erc-ezb-version "$Revision: 1.9 $"
+(defconst erc-ezb-version "$Revision: 1.11 $"
"ERC EZBouncer revision.")
(defgroup erc-ezbounce nil
@@ -75,7 +75,7 @@ The alist's format is as follows:
;;;###autoload
(defun erc-cmd-ezb (line &optional force)
"Send EZB commands to the EZBouncer verbatim."
- (erc-send-command (concat "EZB " line)))
+ (erc-server-send (concat "EZB " line)))
(put 'erc-cmd-EZB 'do-not-parse-args t)
;;;###autoload
@@ -124,7 +124,7 @@ in the alist is `nil', prompt for the ap
(unless (null login)
(let ((username (car login))
(pass (cdr login)))
- (erc-send-command (concat "LOGIN " username " " pass))))))
+ (erc-server-send (concat "LOGIN " username " " pass))))))
;;;###autoload
(defun erc-ezb-init-session-list (message)
@@ -158,7 +158,7 @@ in the alist is `nil', prompt for the ap
(erc-string-to-port
(read-from-minibuffer "IRC port: "
(erc-port-to-string "6667")))))
- (erc-send-command (format "CONN %s %s" server port)))))
+ (erc-server-send (format "CONN %s %s" server port)))))
;;;###autoload
@@ -168,7 +168,7 @@ in the alist is `nil', prompt for the ap
erc-ezb-session-list)))
(if (string= session "")
nil
- (erc-send-command (format "REATTACH %s" session)))))
+ (erc-server-send (format "REATTACH %s" session)))))
;;;###autoload
1.7 +4 -4 XEmacs/packages/xemacs-packages/erc/erc-fill.el
Index: erc-fill.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-fill.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- erc-fill.el 2005/04/10 14:47:35 1.6
+++ erc-fill.el 2005/10/15 18:15:28 1.7
@@ -19,9 +19,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;; This file is not part of GNU Emacs.
@@ -36,7 +36,7 @@
(require 'erc)
(require 'erc-stamp); for the timestamp stuff
-(defconst erc-fill-version "$Revision: 1.30 $"
+(defconst erc-fill-version "$Revision: 1.31 $"
"ERC fill revision.")
(defgroup erc-fill nil
1.2 +34 -33 XEmacs/packages/xemacs-packages/erc/erc-goodies.el
Index: erc-goodies.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-goodies.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- erc-goodies.el 2005/04/10 14:47:35 1.1
+++ erc-goodies.el 2005/10/15 18:15:28 1.2
@@ -31,8 +31,8 @@
;; Imenu Autoload
(add-hook 'erc-mode-hook
- (lambda ()
- (setq imenu-create-index-function 'erc-create-imenu-index)))
+ (lambda ()
+ (setq imenu-create-index-function 'erc-create-imenu-index)))
(autoload 'erc-create-imenu-index "erc-imenu" "Imenu index creation
function")
;;; Automatically scroll to bottom
@@ -80,16 +80,17 @@ DISPLAY-START is ignored."
;; works, but it solves the problem, and has no negative side effects.
;; (Fran Litterio, 2003/01/07)
(let ((resize-mini-windows nil))
- (save-selected-window
- (select-window window)
- (save-restriction
- (widen)
- (when (and erc-insert-marker
- (> (point) erc-insert-marker)) ; we're editing a line. Scroll.
- (save-excursion
- (goto-char (point-max))
- (recenter (or erc-input-line-position -1))
- (sit-for 0))))))))
+ (save-selected-window
+ (select-window window)
+ (save-restriction
+ (widen)
+ (when (and erc-insert-marker
+ ;; we're editing a line. Scroll.
+ (> (point) erc-insert-marker))
+ (save-excursion
+ (goto-char (point-max))
+ (recenter (or erc-input-line-position -1))
+ (sit-for 0))))))))
;;; Make read only
(define-erc-module readonly nil
@@ -108,11 +109,11 @@ Put this function on `erc-insert-post-ho
;; Distingush non-commands
(defvar erc-noncommands-list '(erc-cmd-ME
- erc-cmd-COUNTRY
- erc-cmd-SV
- erc-cmd-SM
- erc-cmd-SMV
- erc-cmd-LASTLOG)
+ erc-cmd-COUNTRY
+ erc-cmd-SV
+ erc-cmd-SM
+ erc-cmd-SMV
+ erc-cmd-LASTLOG)
"List of commands that are aliases for CTCP ACTION or for erc messages.
If a command's function symbol is in this list, the typed command
@@ -128,11 +129,11 @@ themselves."
(defun erc-send-distinguish-noncommands (str)
"If STR is an ERC non-command, set `erc-insert-this' to nil."
(let* ((command (erc-extract-command-from-line str))
- (cmd-fun (and command
- (car command))))
+ (cmd-fun (and command
+ (car command))))
(when (and cmd-fun
- (not (string-match "\n.+$" str))
- (memq cmd-fun erc-noncommands-list))
+ (not (string-match "\n.+$" str))
+ (memq cmd-fun erc-noncommands-list))
(setq erc-insert-this nil))))
;;; IRC control character processing.
@@ -278,9 +279,9 @@ The value `erc-interpret-controls-p' mus
(if (stringp n) (setq n (string-to-number n)))
(if (not (numberp n))
(progn
- (message "erc-get-bg-color-face: n is NaN: %S" n)
- (beep)
- 'default)
+ (message "erc-get-bg-color-face: n is NaN: %S" n)
+ (beep)
+ 'default)
(when (> n 16)
(erc-log (format " Wrong color: %s" n))
(setq n (mod n 16)))
@@ -294,9 +295,9 @@ The value `erc-interpret-controls-p' mus
(if (stringp n) (setq n (string-to-number n)))
(if (not (numberp n))
(progn
- (message "erc-get-fg-color-face: n is NaN: %S" n)
- (beep)
- 'default)
+ (message "erc-get-fg-color-face: n is NaN: %S" n)
+ (beep)
+ 'default)
(when (> n 16)
(erc-log (format " Wrong color: %s" n))
(setq n (mod n 16)))
@@ -461,11 +462,11 @@ If ARG is positive, interpretation is tu
Else interpretation is turned off."
(interactive "P")
(cond ((and (numberp arg) (> arg 0))
- (setq erc-interpret-controls-p t))
- (arg (setq erc-interpret-controls-p nil))
- (t (setq erc-interpret-controls-p (not erc-interpret-controls-p))))
+ (setq erc-interpret-controls-p t))
+ (arg (setq erc-interpret-controls-p nil))
+ (t (setq erc-interpret-controls-p (not erc-interpret-controls-p))))
(message "ERC color interpretation %s"
- (if erc-interpret-controls-p "ON" "OFF")))
+ (if erc-interpret-controls-p "ON" "OFF")))
;; Smiley
(define-erc-module smiley nil
@@ -506,8 +507,8 @@ If called interactively and prefix argum
servers. If called from a program, PROC specifies the server process."
(interactive
(list (read-string "Search for: ")
- (if current-prefix-arg
- nil erc-process)))
+ (if current-prefix-arg
+ nil erc-server-process)))
(if (fboundp 'multi-occur)
(multi-occur (erc-buffer-list nil proc) string)
(error "`multi-occur' is not defined as a function")))
1.5 +32 -27 XEmacs/packages/xemacs-packages/erc/erc-ibuffer.el
Index: erc-ibuffer.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-ibuffer.el,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- erc-ibuffer.el 2005/04/10 14:47:36 1.4
+++ erc-ibuffer.el 2005/10/15 18:15:28 1.5
@@ -17,9 +17,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -31,7 +31,7 @@
(require 'ibuffer)
-(defconst erc-ibuffer-version "$Revision: 1.24 $"
+(defconst erc-ibuffer-version "$Revision: 1.27 $"
"ERC ibuffer revision.")
(defgroup erc-ibuffer nil
@@ -66,8 +66,8 @@
regexp)))
(with-current-buffer buf
(and (eq major-mode 'erc-mode)
- (boundp 'erc-announced-server-name)
- (string-match qualifier erc-announced-server-name))))
+ (string-match qualifier (or erc-server-announced-name
+ erc-session-server)))))
(ibuffer-define-column erc-modified (:name "M")
(if (and (boundp 'erc-track-mode)
@@ -89,15 +89,15 @@
" "))
(ibuffer-define-column erc-server-name (:name "Server")
- (if (and (boundp 'erc-process) (processp erc-process))
- (with-current-buffer (process-buffer erc-process)
- erc-announced-server-name)
+ (if (and (boundp 'erc-server-process) (processp erc-server-process))
+ (with-current-buffer (process-buffer erc-server-process)
+ (or erc-server-announced-name erc-session-server))
""))
(ibuffer-define-column erc-target (:name "Target")
(if (eq major-mode 'erc-mode)
- (cond ((and (boundp 'erc-process) (processp erc-process)
- (eq (current-buffer) (process-buffer erc-process)))
+ (cond ((and (boundp 'erc-server-process) (processp erc-server-process)
+ (eq (current-buffer) (process-buffer erc-server-process)))
(concat "Server " erc-session-server ":"
(erc-port-to-string erc-session-port)))
((erc-channel-p (erc-default-target))
@@ -109,48 +109,48 @@
(ibuffer-define-column erc-topic (:name "Topic")
(if (and (eq major-mode 'erc-mode)
- (boundp 'channel-topic))
- (erc-controls-interpret channel-topic)
+ erc-channel-topic)
+ (erc-controls-interpret erc-channel-topic)
""))
(ibuffer-define-column
erc-members (:name "Users")
(if (and (eq major-mode 'erc-mode)
- (boundp 'erc-channel-users)
- (hash-table-p erc-channel-users)
- (> (hash-table-size erc-channel-users) 0))
+ (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")
- (if (and (boundp 'erc-process)
- (processp erc-process)
- (with-current-buffer (process-buffer erc-process)
- away))
+ (if (and (boundp 'erc-server-process)
+ (processp erc-server-process)
+ (with-current-buffer (process-buffer erc-server-process)
+ erc-away))
"A"
" "))
(ibuffer-define-column
erc-op (:name "O")
(if (and (eq major-mode 'erc-mode)
- (erc-channel-user-op-p (erc-current-nick)))
+ (erc-channel-user-op-p (erc-current-nick)))
"@"
" "))
(ibuffer-define-column erc-voice (:name "V")
(if (and (eq major-mode 'erc-mode)
- (erc-channel-user-voice-p (erc-current-nick)))
+ (erc-channel-user-voice-p (erc-current-nick)))
"+"
" "))
(ibuffer-define-column erc-channel-modes (:name "Mode")
(if (and (eq major-mode 'erc-mode)
- (or (> (length channel-modes) 0)
- channel-user-limit))
+ (or (> (length erc-channel-modes) 0)
+ erc-channel-user-limit))
(concat (apply 'concat
- "(+" channel-modes)
- (if channel-user-limit
- (format "l %d" channel-user-limit)
+ "(+" erc-channel-modes)
+ (if erc-channel-user-limit
+ (format "l %d" erc-channel-user-limit)
"")
")")
(if (not (eq major-mode 'erc-mode))
@@ -175,3 +175,8 @@
(provide 'erc-ibuffer)
;;; erc-ibuffer.el ends here
+;;
+;; Local Variables:
+;; indent-tabs-mode: t
+;; tab-width: 8
+;; End:
1.3 +18 -8 XEmacs/packages/xemacs-packages/erc/erc-identd.el
Index: erc-identd.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-identd.el,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- erc-identd.el 2005/04/10 14:47:36 1.2
+++ erc-identd.el 2005/10/15 18:15:28 1.3
@@ -16,9 +16,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -51,16 +51,20 @@ machine -- using iptables, or a program
run from inetd. The idea is to provide a simple identd server
when you need one, without having to install one globally on your
system."
- (interactive (list (read-input "Serve identd requests on port: "
"8113")))
+ (interactive (list (read-string "Serve identd requests on port: "
"8113")))
(if (null port)
(setq port 8113)
(if (stringp port)
- (setq port (string-to-int port))))
+ (setq port (string-to-number port))))
(if erc-identd-process
(delete-process erc-identd-process))
- (setq erc-identd-process
- (open-network-stream-server "identd" (generate-new-buffer
"identd")
- port nil 'erc-identd-filter)))
+ (if (fboundp 'make-network-process)
+ (setq erc-identd-process
+ (make-network-process :name "identd"
+ :buffer (generate-new-buffer "identd")
+ :service port :server t :noquery t
+ :filter 'erc-identd-filter))
+ (error "Your Emacs is too old; cannot start ident server")))
(defun erc-identd-stop (&rest ignore)
(interactive)
@@ -69,4 +73,10 @@ system."
(setq erc-identd-process nil)))
(provide 'erc-identd)
+
;;; erc-identd.el ends here
+;;
+;; Local Variables:
+;; indent-tabs-mode: t
+;; tab-width: 8
+;; End:
1.6 +25 -17 XEmacs/packages/xemacs-packages/erc/erc-imenu.el
Index: erc-imenu.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-imenu.el,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- erc-imenu.el 2005/04/10 14:47:36 1.5
+++ erc-imenu.el 2005/10/15 18:15:28 1.6
@@ -17,9 +17,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -45,7 +45,7 @@
(require 'erc)
(require 'imenu)
-(defconst erc-imenu-version "$Revision: 1.8 $"
+(defconst erc-imenu-version "$Revision: 1.10 $"
"ERC imenu revision.")
(defun erc-unfill-notice ()
@@ -63,7 +63,8 @@ Don't rely on this function, read it fir
(with-temp-buffer
(insert str)
(goto-char (point-min))
- (replace-regexp "\n[ ]+" " ")
+ (while (re-search-forward "\n +" nil t)
+ (replace-match " "))
(buffer-substring (point-min) (point-max)))))
;;;###autoload
@@ -80,10 +81,10 @@ Don't rely on this function, read it fir
(goto-char (point-max))
(imenu-progress-message prev-pos 0)
(while (if (bolp)
- (> (forward-line -1)
- -1)
- (progn (forward-line 0)
- t))
+ (> (forward-line -1)
+ -1)
+ (progn (forward-line 0)
+ t))
(imenu-progress-message prev-pos nil t)
(save-match-data
(when (looking-at (concat (regexp-quote erc-notice-prefix)
@@ -118,17 +119,24 @@ Don't rely on this function, read it fir
(when (looking-at "<\\(\\S-+\\)> \\(.+\\)$")
(let ((from (match-string 1))
(message-text (match-string 2)))
- (push (cons (concat from ": " message-text) (point))
+ (push (cons (concat from ": " message-text) (point))
message-alist)))))
- (and notice-alist (push (cons "notices" notice-alist) index-alist))
- (and join-alist (push (cons "joined" join-alist) index-alist))
- (and left-alist (push (cons "parted" left-alist) index-alist))
- (and quit-alist (push (cons "quit" quit-alist) index-alist))
- (and mode-change-alist (push (cons "mode-change" mode-change-alist)
index-alist))
- (and message-alist (push (cons "messages" message-alist)
index-alist))
- (and topic-change-alist (push (cons "topic-change" topic-change-alist)
index-alist))
+ (and notice-alist (push (cons "notices" notice-alist) index-alist))
+ (and join-alist (push (cons "joined" join-alist) index-alist))
+ (and left-alist (push (cons "parted" left-alist) index-alist))
+ (and quit-alist (push (cons "quit" quit-alist) index-alist))
+ (and mode-change-alist (push (cons "mode-change" mode-change-alist)
+ index-alist))
+ (and message-alist (push (cons "messages" message-alist) index-alist))
+ (and topic-change-alist (push (cons "topic-change" topic-change-alist)
+ index-alist))
index-alist))
(provide 'erc-imenu)
;;; erc-imenu.el ends here
+;;
+;; Local Variables:
+;; indent-tabs-mode: t
+;; tab-width: 8
+;; End:
1.4 +3 -3 XEmacs/packages/xemacs-packages/erc/erc-lang.el
Index: erc-lang.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-lang.el,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- erc-lang.el 2005/04/10 14:47:36 1.3
+++ erc-lang.el 2005/10/15 18:15:28 1.4
@@ -21,9 +21,9 @@
;; License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
1.10 +32 -30 XEmacs/packages/xemacs-packages/erc/erc-list.el
Index: erc-list.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-list.el,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- erc-list.el 2005/06/05 15:47:02 1.9
+++ erc-list.el 2005/10/15 18:15:28 1.10
@@ -17,9 +17,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -35,7 +35,7 @@
(unless (fboundp 'make-overlay)
(require 'overlay))
-(defconst erc-list-version "$Revision: 1.42 $"
+(defconst erc-list-version "$Revision: 1.44 $"
"ERC channel list revision number")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -228,12 +228,14 @@ to RFC and send the LIST header (#321) a
(message "")
t))
- (setq erc-chanlist-buffer (get-buffer-create (format "*Channels on %s*"
(erc-response.sender parsed))))
+ (setq erc-chanlist-buffer (get-buffer-create
+ (format "*Channels on %s*"
+ (erc-response.sender parsed))))
(with-current-buffer erc-chanlist-buffer
(setq buffer-read-only nil)
(erase-buffer)
(erc-chanlist-mode)
- (setq erc-process proc)
+ (setq erc-server-process proc)
(if erc-chanlist-hide-modeline
(setq mode-line-format nil))
(setq buffer-read-only t))
@@ -242,10 +244,10 @@ to RFC and send the LIST header (#321) a
;; Now that we've setup our callbacks, pull the trigger.
(if (interactive-p)
(message "Collecting channel list for server %s" erc-session-server))
- (erc-send-command (if (null channels)
+ (erc-server-send (if (null channels)
"LIST"
(concat "LIST "
- (mapconcat #'identity channels ","))))))
+ (mapconcat #'identity channels ","))))))
(defun erc-chanlist-322 (proc parsed)
"Process an IRC 322 message.
@@ -256,24 +258,24 @@ command."
(cdr (erc-response.command-args parsed))
(let ((topic (erc-response.contents parsed)))
(with-current-buffer erc-chanlist-buffer
- (save-excursion
- (goto-char (point-max))
- (let (buffer-read-only)
- (insert (format "%-26s%4s %s\n" (erc-controls-strip channel)
- num-users
- (erc-controls-strip topic))))
-
- ;; Maybe display a progress indicator in the minibuffer.
- (when (and erc-chanlist-progress-message
- (> (erc-time-diff
- erc-chanlist-last-time (erc-current-time))
- 3))
- (setq erc-chanlist-last-time (erc-current-time))
- (message "Accumulating channel list ... %c"
- (aref [?/ ?| ?\\ ?- ?! ?O ?o] (random 7))))
+ (save-excursion
+ (goto-char (point-max))
+ (let (buffer-read-only)
+ (insert (format "%-26s%4s %s\n" (erc-controls-strip channel)
+ num-users
+ (erc-controls-strip topic))))
+
+ ;; Maybe display a progress indicator in the minibuffer.
+ (when (and erc-chanlist-progress-message
+ (> (erc-time-diff
+ erc-chanlist-last-time (erc-current-time))
+ 3))
+ (setq erc-chanlist-last-time (erc-current-time))
+ (message "Accumulating channel list ... %c"
+ (aref [?/ ?| ?\\ ?- ?! ?O ?o] (random 7))))
- ;; Return success to prevent other hook functions from being run.
- t)))))
+ ;; Return success to prevent other hook functions from being run.
+ t)))))
(defun erc-chanlist-post-command-hook ()
"Keep the current line highlighted."
@@ -287,9 +289,9 @@ command."
(defun erc-chanlist-highlight-line ()
"Highlight the current line."
(unless erc-chanlist-highlight-overlay
- (setq erc-chanlist-highlight-overlay
+ (setq erc-chanlist-highlight-overlay
(make-overlay (point-min) (point-min)))
- ; Detach it from the buffer.
+ ;; Detach it from the buffer.
(delete-overlay erc-chanlist-highlight-overlay)
(overlay-put erc-chanlist-highlight-overlay
'face erc-chanlist-highlight-face)
@@ -346,7 +348,8 @@ Either sort by channel names or by numbe
(setq erc-chanlist-sort-state 'channel))
(goto-char (point-min))
- (if (search-forward-regexp "^[0-9]+ channels (sorted by \\(.*\\)).$" nil t)
+ (if (search-forward-regexp "^[0-9]+ channels (sorted by \\(.*\\)).$"
+ nil t)
(replace-match (if (eq erc-chanlist-sort-state 'channel)
"channel name"
"number of users")
@@ -357,7 +360,7 @@ Either sort by channel names or by numbe
(forward-line 1)
(recenter -1)
- (erc-prettify-channel-list)))))
+ (erc-prettify-channel-list)))))
(defun erc-chanlist-quit ()
"Quit Chanlist mode.
@@ -388,5 +391,4 @@ Private channels, which are shown as ast
;; Local Variables:
;; indent-tabs-mode: t
;; tab-width: 8
-;; standard-indent: 4
;; End:
1.8 +39 -41 XEmacs/packages/xemacs-packages/erc/erc-log.el
Index: erc-log.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-log.el,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- erc-log.el 2005/04/25 21:47:25 1.7
+++ erc-log.el 2005/10/15 18:15:28 1.8
@@ -1,7 +1,6 @@
;;; erc-log.el --- Logging facilities for ERC.
;; Copyright (C) 2003,2004,2005 Free Software Foundation, Inc.
-;; Copyright (C) 2004 Adrian Aichner
;; Author: Lawrence Mitchell <wence(a)gmx.li>
;; Keywords: IRC, chat, client, Internet, logging
@@ -94,7 +93,7 @@
(require 'erc)
-(defconst erc-log-version "$Revision: 1.24 $"
+(defconst erc-log-version "$Revision: 1.26 $"
"ERC log mode revision")
(defgroup erc-log nil
@@ -107,7 +106,8 @@ The function must take five arguments: B
BUFFER is the buffer to be saved,
TARGET is the name of the channel, or the target of the query,
NICK is the current nick,
-SERVER and PORT are the parameters used to connect BUFFERs `erc-process'."
+SERVER and PORT are the parameters used to connect BUFFERs
+`erc-server-process'."
:group 'erc-log
:type '(choice (const erc-generate-log-file-name-long)
(const erc-generate-log-file-name-short)
@@ -137,7 +137,7 @@ default value.
Log files are stored in `erc-log-channels-directory'."
:group 'erc-log
:type '(choice boolean
- function))
+ function))
(make-variable-buffer-local 'erc-enable-logging)
(defcustom erc-log-channels-directory "~/log"
@@ -184,7 +184,7 @@ also be a predicate function. To only lo
\(setq erc-enable-logging
(lambda (buffer)
(with-current-buffer buffer
- (not away))))"
+ (not erc-away))))"
;; enable
((add-hook 'erc-insert-post-hook
'erc-save-buffer-in-logs)
@@ -198,13 +198,13 @@ also be a predicate function. To only lo
(when erc-enable-logging
(add-hook 'erc-kill-buffer-hook
- 'erc-save-buffer-in-logs)
+ 'erc-save-buffer-in-logs)
(add-hook 'erc-kill-channel-hook
- 'erc-save-buffer-in-logs)
+ 'erc-save-buffer-in-logs)
(add-hook 'erc-quit-hook
- 'erc-conditional-save-queries)
+ 'erc-conditional-save-queries)
(add-hook 'erc-part-hook
- 'erc-conditional-save-buffer))
+ 'erc-conditional-save-buffer))
(define-key erc-mode-map "\C-c\C-l" 'erc-save-buffer-in-logs)
@@ -220,12 +220,12 @@ This function is destined to be run from
(setq local-write-file-hooks
'(erc-save-buffer-in-logs)) ;Emacs >=19
(make-local-variable 'write-file-hooks)
- (setq write-file-hooks ;Emacs 18
+ (setq write-file-hooks ;Emacs 18
'(erc-save-buffer-in-logs)))
(when erc-log-insert-log-on-open
(ignore-errors (insert-file-contents (erc-current-logfile))
- (move-marker erc-last-saved-position
- (1- (point-max)))))))
+ (move-marker erc-last-saved-position
+ (1- (point-max)))))))
;;; Append, so that 'erc-initialize-log-marker keeps running first.
(add-hook 'erc-connect-pre-hook 'erc-log-setup-logging 'append)
@@ -264,8 +264,8 @@ is writeable (it will be created as nece
(and erc-log-channels-directory
(erc-directory-writable-p erc-log-channels-directory)
(if (functionp erc-enable-logging)
- (funcall erc-enable-logging (or buffer (current-buffer)))
- erc-enable-logging)))
+ (funcall erc-enable-logging (or buffer (current-buffer)))
+ erc-enable-logging)))
(defun erc-current-logfile (&optional buffer)
"Return the logfile to use for BUFFER.
@@ -275,7 +275,7 @@ The result is converted to lowercase, as
(expand-file-name
(downcase (funcall erc-generate-log-file-name-function
(or buffer (current-buffer))
- (or (erc-default-target) (buffer-name buffer))
+ (or (erc-default-target) (buffer-name buffer))
(erc-current-nick)
erc-session-server erc-session-port))
erc-log-channels-directory))
@@ -322,32 +322,31 @@ You can save every individual message by
(or buffer (setq buffer (current-buffer)))
(when (erc-logging-enabled buffer)
(let ((file (erc-current-logfile buffer))
- (coding-system-for-write erc-log-file-coding-system))
+ (coding-system-for-write erc-log-file-coding-system))
(save-excursion
- (with-current-buffer buffer
- (save-restriction
- (widen)
- ;; early on in the initalisation, don't try and write the log out
- (when (and (markerp erc-last-saved-position)
- (> erc-insert-marker (1+ erc-last-saved-position)))
- (write-region (1+ (marker-position erc-last-saved-position))
- (marker-position erc-insert-marker)
- file t 'nomessage)
- (if (and erc-truncate-buffer-on-save (interactive-p))
- (progn
- (let ((inhibit-read-only t)) (erase-buffer))
- (move-marker erc-last-saved-position (point-max))
- (erc-display-prompt))
- (move-marker erc-last-saved-position
- ;; If we place erc-last-saved-position
- ;; at erc-insert-marker, because text
- ;; gets inserted /before/
- ;; erc-insert-marker, the log file will
- ;; not be saved (erc-last-saved-position
- ;; will always be equal to
- ;; erc-insert-marker).
- (1- (marker-position erc-insert-marker)))))
- (set-buffer-modified-p nil))))))
+ (with-current-buffer buffer
+ (save-restriction
+ (widen)
+ ;; early on in the initalisation, don't try and write the log out
+ (when (and (markerp erc-last-saved-position)
+ (> erc-insert-marker (1+ erc-last-saved-position)))
+ (write-region (1+ (marker-position erc-last-saved-position))
+ (marker-position erc-insert-marker)
+ file t 'nomessage)
+ (if (and erc-truncate-buffer-on-save (interactive-p))
+ (progn
+ (let ((inhibit-read-only t)) (erase-buffer))
+ (move-marker erc-last-saved-position (point-max))
+ (erc-display-prompt))
+ (move-marker erc-last-saved-position
+ ;; If we place erc-last-saved-position at
+ ;; erc-insert-marker, because text gets
+ ;; inserted /before/ erc-insert-marker,
+ ;; the log file will not be saved
+ ;; (erc-last-saved-position will always
+ ;; be equal to erc-insert-marker).
+ (1- (marker-position erc-insert-marker)))))
+ (set-buffer-modified-p nil))))))
t)
(provide 'erc-log)
@@ -357,5 +356,4 @@ You can save every individual message by
;; Local Variables:
;; indent-tabs-mode: t
;; tab-width: 8
-;; standard-indent: 4
;; End:
1.9 +39 -41 XEmacs/packages/xemacs-packages/erc/erc-match.el
Index: erc-match.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-match.el,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- erc-match.el 2005/04/10 14:47:36 1.8
+++ erc-match.el 2005/10/15 18:15:28 1.9
@@ -18,9 +18,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -38,7 +38,7 @@
;; Customisation:
-(defconst erc-match-version "$Revision: 1.41 $"
+(defconst erc-match-version "$Revision: 1.45 $"
"ERC match mode revision.")
(defgroup erc-match nil
@@ -213,11 +213,12 @@ be formatted. The various format specs a
:group 'erc-match
:type 'string)
-(defcustom erc-text-matched-hook '(erc-log-matches erc-hide-fools)
+(defcustom erc-text-matched-hook '(erc-log-matches)
"Hook run when text matches a given match-type.
Functions in this hook are passed as arguments:
\(match-type nick!user@host message) where MATCH-TYPE is a symbol of:
keyword, pal, dangerous-host, fool"
+ :options '(erc-log-matches erc-hide-fools)
:group 'erc-match
:type 'hook)
@@ -326,7 +327,8 @@ car is the string."
(defun erc-add-fool ()
"Add fool interactively to `erc-fools'."
(interactive)
- (erc-add-entry-to-list 'erc-fools "Add fool: "
(erc-get-server-nickname-alist)))
+ (erc-add-entry-to-list 'erc-fools "Add fool: "
+ (erc-get-server-nickname-alist)))
;;;###autoload
(defun erc-delete-fool ()
@@ -363,7 +365,7 @@ car is the string."
NICKUSERHOST will be ignored."
(with-syntax-table erc-match-syntax-table
(and msg
- (string-match (concat "\\b"
+ (string-match (concat "\\b"
(regexp-quote (erc-current-nick))
"\\b")
msg))))
@@ -469,35 +471,35 @@ Use this defun with `erc-insert-modify-h
(match-face (intern (concat match-prefix "-face"))))
(when (funcall match-pred nickuserhost message)
(cond
- ;; Highlight the nick of the message
+ ;; 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
+ ;; 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 occurrences of the word to be
- ;; highlighted.
+ ;; Highlight all occurrences 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))
@@ -511,7 +513,7 @@ Use this defun with `erc-insert-modify-h
(match-beginning 0) (match-end 0)
'face face))))
match-regex))
- ;; Highlight all occurrences of our nick.
+ ;; Highlight all occurrences of our nick.
((and (string= match-type "current-nick")
(eq match-htype 'keyword))
(goto-char (+ 2 (or nick-end
@@ -519,7 +521,7 @@ Use this defun with `erc-insert-modify-h
(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.
+ ;; Else twiddle your thumbs.
(t nil))
(run-hook-with-args
'erc-text-matched-hook
@@ -531,9 +533,6 @@ Use this defun with `erc-insert-modify-h
(append to-match-nick-dep to-match-nick-indep)
to-match-nick-indep)))))
-;; used in erc.el for session buffers only -- silence the compiler, here
-(defvar away)
-
(defun erc-log-matches (match-type nickuserhost message)
"Log matches in a separate buffer, determined by MATCH-TYPE.
The behaviour of this function is controlled by the variables
@@ -547,7 +546,7 @@ deactivate/activate match logging in the
(when (and
(or (eq erc-log-matches-flag t)
(and (eq erc-log-matches-flag 'away)
- away))
+ erc-away))
match-buffer-name)
(let ((line (format-spec erc-log-match-format
(format-spec-make
@@ -566,19 +565,19 @@ deactivate/activate match logging in the
(defun erc-log-matches-make-buffer (name)
"Create or get a log-matches buffer named NAME and return it."
(let* ((buffer-already (get-buffer name))
- (buffer (or buffer-already
- (get-buffer-create name))))
+ (buffer (or buffer-already
+ (get-buffer-create name))))
(with-current-buffer buffer
(unless buffer-already
(insert " == Type \"q\" to dismiss messages ==\n")
- (view-mode-enter nil (lambda (buffer)
- (when (y-or-n-p "Discard messages?")
- (kill-buffer buffer)))))
+ (erc-view-mode-enter nil (lambda (buffer)
+ (when (y-or-n-p "Discard messages?")
+ (kill-buffer buffer)))))
buffer)))
(defun erc-log-matches-come-back (proc parsed)
"Display a notice that messages were logged while away."
- (when (and away
+ (when (and erc-away
(eq erc-log-matches-flag 'away))
(mapc
(lambda (match-type)
@@ -589,7 +588,7 @@ deactivate/activate match logging in the
(with-current-buffer buffer
(get-text-property (1- (point-max))
'timestamp))))
- (away-time (erc-emacs-time-to-erc-time away)))
+ (away-time (erc-emacs-time-to-erc-time erc-away)))
(when (and away-time last-msg-time
(erc-time-gt last-msg-time away-time))
(erc-display-message
@@ -634,5 +633,4 @@ This function should be called from `erc
;; Local Variables:
;; indent-tabs-mode: t
;; tab-width: 8
-;; standard-indent: 4
;; End:
1.7 +32 -31 XEmacs/packages/xemacs-packages/erc/erc-menu.el
Index: erc-menu.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-menu.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- erc-menu.el 2005/04/10 14:47:36 1.6
+++ erc-menu.el 2005/10/15 18:15:29 1.7
@@ -17,9 +17,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -29,52 +29,52 @@
(require 'easymenu)
-(defconst erc-menu-version "$Revision: 1.20 $"
+(defconst erc-menu-version "$Revision: 1.22 $"
"ERC menu revision")
(defvar erc-menu-definition
(list "IRC"
["Connect to server..." erc-select t]
- ["Disconnect from server..." erc-quit-server erc-connected]
+ ["Disconnect from server..." erc-quit-server erc-server-connected]
"-"
["List channels..." erc-cmd-LIST
- (and erc-connected (fboundp 'erc-cmd-LIST))]
- ["Join channel..." erc-join-channel erc-connected]
- ["Start a query..." erc-cmd-QUERY erc-connected]
+ (and erc-server-connected (fboundp 'erc-cmd-LIST))]
+ ["Join channel..." erc-join-channel erc-server-connected]
+ ["Start a query..." erc-cmd-QUERY erc-server-connected]
"-"
- ["List users in channel" erc-channel-names erc-channel-users]
- ["List channel operators" erc-cmd-OPS erc-channel-users]
+ ["List users in channel" erc-channel-names erc-channel-users]
+ ["List channel operators" erc-cmd-OPS erc-channel-users]
["Input action..." erc-input-action (erc-default-target)]
["Set topic..." erc-set-topic
(and (and (erc-default-target) (not (erc-query-buffer-p)))
- (or (not (member "t" channel-modes))
+ (or (not (member "t" erc-channel-modes))
(erc-channel-user-op-p (erc-current-nick))))]
(list "Channel modes"
["Change mode..." erc-insert-mode-command
- (erc-channel-user-op-p (erc-current-nick))]
+ (erc-channel-user-op-p (erc-current-nick))]
["No external send" (erc-toggle-channel-mode "n")
- :active (erc-channel-user-op-p (erc-current-nick))
- :style toggle :selected (member "n" channel-modes)]
+ :active (erc-channel-user-op-p (erc-current-nick))
+ :style toggle :selected (member "n" erc-channel-modes)]
["Topic set by channel operator" (erc-toggle-channel-mode
"t")
- :style toggle :selected (member "t" channel-modes)
- :active (erc-channel-user-op-p (erc-current-nick))]
+ :style toggle :selected (member "t" erc-channel-modes)
+ :active (erc-channel-user-op-p (erc-current-nick))]
["Invite only" (erc-toggle-channel-mode "i")
- :style toggle :selected (member "i" channel-modes)
- :active (erc-channel-user-op-p (erc-current-nick))]
+ :style toggle :selected (member "i" erc-channel-modes)
+ :active (erc-channel-user-op-p (erc-current-nick))]
["Private" (erc-toggle-channel-mode "p")
- :style toggle :selected (member "p" channel-modes)
- :active (erc-channel-user-op-p (erc-current-nick))]
+ :style toggle :selected (member "p" erc-channel-modes)
+ :active (erc-channel-user-op-p (erc-current-nick))]
["Secret" (erc-toggle-channel-mode "s")
- :style toggle :selected (member "s" channel-modes)
- :active (erc-channel-user-op-p (erc-current-nick))]
+ :style toggle :selected (member "s" erc-channel-modes)
+ :active (erc-channel-user-op-p (erc-current-nick))]
["Moderated" (erc-toggle-channel-mode "m")
- :style toggle :selected (member "m" channel-modes)
- :active (erc-channel-user-op-p (erc-current-nick))]
+ :style toggle :selected (member "m" erc-channel-modes)
+ :active (erc-channel-user-op-p (erc-current-nick))]
["Set a limit..." erc-set-channel-limit
- (erc-channel-user-op-p (erc-current-nick))]
+ (erc-channel-user-op-p (erc-current-nick))]
["Set a key..." erc-set-channel-key
- (erc-channel-user-op-p (erc-current-nick))])
- ["Leave this channel..." erc-part-from-channel erc-channel-users]
+ (erc-channel-user-op-p (erc-current-nick))])
+ ["Leave this channel..." erc-part-from-channel erc-channel-users]
"-"
(list "Pals, fools and other keywords"
["Add pal..." erc-add-pal]
@@ -88,9 +88,10 @@
"-"
(list "IRC services"
["Identify to NickServ..." erc-nickserv-identify
- (and erc-connected (functionp 'erc-nickserv-identify))])
+ (and erc-server-connected (functionp 'erc-nickserv-identify))])
"-"
- ["Save buffer in log" erc-save-buffer-in-logs (fboundp
'erc-save-buffer-in-logs)]
+ ["Save buffer in log" erc-save-buffer-in-logs
+ (fboundp 'erc-save-buffer-in-logs)]
["Truncate buffer" erc-truncate-buffer (fboundp 'erc-truncate-buffer)]
"-"
["Customize ERC" (customize-group 'erc) t]
@@ -106,7 +107,8 @@
;; for some reason the menu isn't automatically added to the menu bar
(when (featurep 'xemacs)
- (add-hook 'erc-mode-hook (lambda () (easy-menu-add erc-menu
erc-mode-map))))))
+ (add-hook 'erc-mode-hook
+ (lambda () (easy-menu-add erc-menu erc-mode-map))))))
(provide 'erc-menu)
@@ -115,5 +117,4 @@
;; Local Variables:
;; indent-tabs-mode: t
;; tab-width: 8
-;; standard-indent: 4
;; End:
1.7 +17 -26 XEmacs/packages/xemacs-packages/erc/erc-nets.el
Index: erc-nets.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-nets.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- erc-nets.el 2005/04/10 14:47:37 1.6
+++ erc-nets.el 2005/10/15 18:15:29 1.7
@@ -27,7 +27,7 @@
(require 'erc)
-(defconst erc-nets-version "$Revision: 1.19 $"
+(defconst erc-nets-version "$Revision: 1.20 $"
"ERC networks revision.")
;; Variables
@@ -682,13 +682,13 @@ PORTS is either a number, a list of numb
"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
- it. If it is regexp, it's used to match against `erc-announced-server-name'.
+ it. If it is regexp, it's used to match against `erc-server-announced-name'.
It can also be a function (predicate). Then it is executed with the
server buffer as current-buffer."
:group 'erc-networks
:type '(repeat
- (list :tag "Network"
- (symbol :tag "Network name")
+ (list :tag "Network"
+ (symbol :tag "Network name")
(choice :tag "Network's common server ending"
(regexp)
(const :tag "Network has no common server ending" nil)))))
@@ -709,11 +709,11 @@ search for a match in `erc-networks-alis
(intern (cdr (assoc "NETWORK" erc-server-parameters)))
(or
;; Loop through `erc-networks-alist' looking for a match.
- (let ((server (or erc-announced-server-name erc-session-server)))
+ (let ((server (or erc-server-announced-name erc-session-server)))
(loop for (name matcher) in erc-networks-alist
- when (and matcher
- (string-match (concat matcher "\\'") server))
- do (return name)))
+ when (and matcher
+ (string-match (concat matcher "\\'") server))
+ do (return name)))
'Unknown)))
(defun erc-network ()
@@ -727,24 +727,18 @@ network as a symbol."
(intern (downcase (symbol-name erc-network)))))
(condition-case nil
- (make-obsolete 'erc-current-network 'erc-network "Obsolete since
erc-nets 1.5")
- (wrong-number-of-arguments (make-obsolete 'erc-current-network
'erc-network)))
+ (make-obsolete 'erc-current-network 'erc-network
+ "Obsolete since erc-nets 1.5")
+ (wrong-number-of-arguments (make-obsolete 'erc-current-network
+ 'erc-network)))
(defun erc-network-name ()
"Returns the name of the current network as a string."
(with-current-buffer (erc-server-buffer) (symbol-name erc-network)))
-;; Why was this function marked obsolete? There is no other function that
-;; returns the name of the current network as a string. Some of us use these
-;; functions in our personal ERC configuration code. (franl, 2004-03-13)
-;;
-;;(condition-case nil
-;; (make-obsolete 'erc-network-name 'erc-network "Obsolete since
erc-nets 1.5")
-;; (wrong-number-of-arguments (make-obsolete 'erc-network-name
'erc-network)))
-
(defun erc-set-network-name (proc parsed)
"Set `erc-network' to the value returned by
`erc-determine-network'."
- (unless erc-connected
+ (unless erc-server-connected
(setq erc-network (erc-determine-network)))
nil)
@@ -775,8 +769,8 @@ As an example:
(push p result))
((listp p)
(setq result (nconc (loop for i from (cadr p) downto (car p)
- collect i)
- result)))))
+ collect i)
+ result)))))
(nreverse result)))
;;;###autoload
@@ -810,7 +804,7 @@ As an example:
;; It does not work yet, help me with it if you
;; think it is worth the effort.
-(defvar erc-settings
+(defvar erc-settings
'((pals freenode ("kensanata" "shapr"
"anti\\(fuchs\\|gone\\)"))
(format-nick-function (freenode "#emacs") erc-format-@nick))
"Experimental: Alist of configuration options.
@@ -842,9 +836,7 @@ VALUE is the options value.")
val))
(erc-get 'pals 'freenode)
-
-
-
+
(provide 'erc-nets)
@@ -853,5 +845,4 @@ VALUE is the options value.")
;; Local Variables:
;; indent-tabs-mode: t
;; tab-width: 8
-;; standard-indent: 4
;; End:
1.7 +4 -4 XEmacs/packages/xemacs-packages/erc/erc-netsplit.el
Index: erc-netsplit.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-netsplit.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- erc-netsplit.el 2005/04/10 14:47:37 1.6
+++ erc-netsplit.el 2005/10/15 18:15:29 1.7
@@ -16,9 +16,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -31,7 +31,7 @@
(require 'erc)
-(defconst erc-netsplit-version "$Revision: 1.13 $"
+(defconst erc-netsplit-version "$Revision: 1.14 $"
"ERC netsplit version.")
(defgroup erc-netsplit nil
1.3 +254 -45 XEmacs/packages/xemacs-packages/erc/erc-nicklist.el
Index: erc-nicklist.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-nicklist.el,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- erc-nicklist.el 2005/04/10 14:47:37 1.2
+++ erc-nicklist.el 2005/10/15 18:15:29 1.3
@@ -7,6 +7,26 @@
;; Created: 2004-04-30
;; Keywords: IRC chat client Internet
+;; Changes by Edgar Gonçalves <edgar.goncalves(a)inesc-id.pt>
+;; Jun 25 2005:
+;; - images are changed to a standard set of names.
+;; - /images now contain gaim's status icons.
+;; May 31 2005:
+;; - tooltips are improved. they try to access bbdb for a nice nick!
+;; Apr 26 2005:
+;; - erc-nicklist-channel-users-info was fixed (sorting bug)
+;; - Away names don't need parenthesis when using icons
+;; Apr 26 2005:
+;; - nicks can display icons of their connection type (msn, icq, for now)
+;; Mar 15 2005:
+;; - nicks now are different for unvoiced and op users
+;; - nicks now have tooltips displaying more info
+;; Mar 18 2005:
+;; - queries now work ok, both on menu and keyb shortcut RET.
+;; - nicklist is now sorted ignoring the case. Voiced nicks will
+;; appear according to `erc-nicklist-voiced-position'.
+
+
;; COPYRIGHT NOTICE
;; This program is free software; you can redistribute it and/or
@@ -25,7 +45,7 @@
;; Foundation, Inc., 675 Mass Ave., Cambridge, MA 02139, USA.
;;; Commentary:
-;;
+;;
;; This provides a minimal mIRC style nicklist buffer for ERC. To
;; activate, do M-x erc-nicklist RET in the channel buffer you want
;; the nicklist to appear for. To close and quit the nicklist
@@ -53,19 +73,45 @@
;; o Allow toggling of visibility of nicklist via ERC commands.
;;; History:
-;;
+;;
;;; Code:
(require 'erc)
+(condition-case nil
+ (require 'erc-bbdb)
+ (error nil))
+(require 'cl)
-(defconst erc-nicklist-version "$Revision: 1.4 $"
+(defconst erc-nicklist-version "$Revision: 1.8 $"
"ERC Nicklist version.")
(defgroup erc-nicklist nil
"Display a list of nicknames in a separate window."
:group 'erc)
+(defcustom erc-nicklist-use-icons t
+ "*If non-nil, display an icon instead of the name of the chat medium.
+By \"chat medium\", we mean IRC, AOL, MSN, ICQ, etc."
+ :group 'erc-nicklist
+ :type 'boolean)
+
+(defcustom erc-nicklist-icons-directory
+ (concat default-directory "images/")
+ "*Directory of the PNG files for chat icons.
+Icons are displayed if `erc-nicklist-use-icons' is non-nil."
+ :group 'erc-nicklist
+ :type 'string)
+
+(defcustom erc-nicklist-voiced-position 'bottom
+ "*Position of voiced nicks in the nicklist.
+The value can be `top', `bottom' or nil (don't sort)."
+ :group 'erc-nicklist
+ :type '(choice
+ (const :tag "Top" 'top)
+ (const :tag "Bottom" 'bottom)
+ (const :tag "Mixed" nil)))
+
(defcustom erc-nicklist-window-size 20.0
"*The size of the nicklist window.
@@ -76,6 +122,10 @@ channel window, and vice versa."
:group 'erc-nicklist
:type 'float)
+
+(defvar erc-nicklist-bitlbee-connected-p nil
+ "Are we connected to bitlbee?")
+
(defun erc-nicklist-buffer-name (&optional buffer)
"Return the buffer name for a nicklist associated with BUFFER.
@@ -87,49 +137,144 @@ If BUFFER is nil, use the value of `curr
See also `erc-nicklist-window-size'."
(let ((width (floor (* (window-width) (/ erc-nicklist-window-size 100.0))))
- (buffer (erc-nicklist-buffer-name))
- window)
+ (buffer (erc-nicklist-buffer-name))
+ window)
(split-window-horizontally (- width))
(setq window (next-window))
(set-window-buffer window (get-buffer-create buffer))
(with-current-buffer buffer
(set-window-dedicated-p window t))))
+
+(defvar erc-nicklist-images-alist '()
+ "Alist that maps a connection type to an icon.")
+
+(defun erc-nicklist-insert-medium-name-or-icon (host is-away)
+ "Inserts an icon or a string identifying the current host type.
+This is configured using `erc-nicklist-use-icons' and
+`erc-nicklist-icons-directory'."
+ (cond ((and erc-nicklist-bitlbee-connected-p
+ (string= "login.icq.com" host))
+ (if erc-nicklist-use-icons
+ (if is-away
+ (insert-image (cdr (assoc 'icq-away
+ erc-nicklist-images-alist)))
+ (insert-image (cdr (assoc 'icq
+ erc-nicklist-images-alist))))
+ (insert "ICQ")))
+ (erc-nicklist-bitlbee-connected-p
+ (if erc-nicklist-use-icons
+ (if is-away
+ (insert-image (cdr (assoc 'msn-away
+ erc-nicklist-images-alist)))
+ (insert-image (cdr (assoc 'msn
+ erc-nicklist-images-alist))))
+ (insert "MSN")))
+ (t
+ (if erc-nicklist-use-icons
+ (if is-away
+ (insert-image (cdr (assoc 'irc-away
+ erc-nicklist-images-alist)))
+ (insert-image (cdr (assoc 'irc
+ erc-nicklist-images-alist))))
+ (insert "IRC"))))
+ (insert " "))
+
+(defun erc-nicklist-search-for-nick (finger-host)
+ "Return the bitlbee-nick field for this contact given FINGER-HOST.
+Seach for the BBDB record of this contact. If not found, return nil."
+ (when (boundp 'erc-bbdb-bitlbee-name-field)
+ (let ((record (car
+ (member-if
+ (lambda (r)
+ (let ((fingers (bbdb-record-finger-host r)))
+ (when fingers
+ (string-match finger-host
+ (car (bbdb-record-finger-host r))))))
+ (bbdb-records)))))
+ (when record
+ (bbdb-get-field record erc-bbdb-bitlbee-name-field)))))
+
+(defun erc-nicklist-insert-contents (channel)
+ "Insert the nicklist contents, with text properties and the optional
images."
+ (let ((erc-nicklist-bitlbee-connected-p
+ (and (string-match "^#bitlbee\\b" (buffer-name channel))
+ (not (string-match "oftc\\.net" (or erc-server-announced-name
+ erc-session-server
+ ""))))))
+ (setq buffer-read-only nil)
+ (erase-buffer)
+ (dolist (u (erc-nicklist-channel-users-info channel))
+ (let* ((server-user (car u))
+ (channel-user (cdr u))
+ (nick (erc-server-user-nickname server-user))
+ (host (erc-server-user-host server-user))
+ (login (erc-server-user-login server-user))
+ (full-name(erc-server-user-full-name server-user))
+ (info (erc-server-user-info server-user))
+ (channels (erc-server-user-buffers server-user))
+ (op (erc-channel-user-op channel-user))
+ (voice (erc-channel-user-voice channel-user))
+ (bbdb-nick (erc-nicklist-search-for-nick (concat login "@" host)))
+ (away-status (if voice "" "\n(Away)"))
+ (balloon-text (concat bbdb-nick (if (string= "" bbdb-nick)
+ "" "\n")
+ "Login: " login "@" host
+ away-status)))
+ ;; identify the network (for bitlebee usage):
+ ;; TODO: find out some proper way of doing this
+ (erc-nicklist-insert-medium-name-or-icon host (not voice))
+ (unless (or voice erc-nicklist-use-icons)
+ (setq nick (concat "(" nick ")")))
+ (when op
+ (setq nick (concat nick " (OP)")))
+ (insert (erc-propertize nick
+ 'erc-nicklist-nick nick
+ 'mouse-face 'highlight
+ 'erc-nicklist-channel channel
+ 'help-echo balloon-text)
+ "\n")))
+ (erc-nicklist-mode)))
+
+
(defun erc-nicklist ()
"Create an ERC nicklist buffer."
(interactive)
(let ((channel (current-buffer)))
+ (unless (or (not erc-nicklist-use-icons)
+ erc-nicklist-images-alist)
+ (setq erc-nicklist-images-alist
+ `((msn . ,(create-image (concat erc-nicklist-icons-directory
+ "msn-online.png")))
+ (msn-away . ,(create-image (concat erc-nicklist-icons-directory
+ "msn-offline.png")))
+ (irc . ,(create-image (concat erc-nicklist-icons-directory
+ "irc-online.png")))
+ (irc-away . ,(create-image (concat erc-nicklist-icons-directory
+ "irc-offline.png")))
+ (icq . ,(create-image (concat erc-nicklist-icons-directory
+ "icq-online.png")))
+ (icq-away . ,(create-image (concat erc-nicklist-icons-directory
+ "icq-offline.png"))))))
(erc-nicklist-make-window)
(with-current-buffer (get-buffer (erc-nicklist-buffer-name channel))
- (setq buffer-read-only nil)
- (erase-buffer)
- (mapc (lambda (n)
- (insert (propertize n 'erc-nicklist-nick n 'mouse-face
'region
- 'erc-nicklist-channel channel
- 'help-echo "Mouse-3 for menu")
"\n"))
- (erc-nicklist-channel-nicks channel))
- (erc-nicklist-mode)))
+ (erc-nicklist-insert-contents channel)))
(add-hook 'erc-channel-members-changed-hook #'erc-nicklist-update))
(defun erc-nicklist-update ()
"Update the ERC nicklist buffer."
(let ((b (get-buffer (erc-nicklist-buffer-name)))
- (channel (current-buffer)))
+ (channel (current-buffer)))
(when b
(with-current-buffer b
- (setq buffer-read-only nil)
- (erase-buffer)
- (mapc (lambda (n)
- (insert (propertize n 'erc-nicklist-nick n 'mouse-face
'region
- 'erc-nicklist-channel channel
- 'help-echo "Mouse-3 for menu")
"\n"))
- (erc-nicklist-channel-nicks channel))
- (erc-nicklist-mode)))))
+ (erc-nicklist-insert-contents channel)))))
(defvar erc-nicklist-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map (kbd "<mouse-3>") 'erc-nicklist-menu)
- (define-key map "q" 'erc-nicklist-quit)
+ (define-key map (kbd "<down-mouse-3>") 'erc-nicklist-menu)
+ (define-key map "\C-j" 'erc-nicklist-kbd-menu)
+ (define-key map "q" 'erc-nicklist-quit)
+ (define-key map (kbd "RET") 'erc-nicklist-kbd-cmd-QUERY)
map)
"Keymap for `erc-nicklist-mode'.")
@@ -143,16 +288,42 @@ See also `erc-nicklist-window-size'."
Depending on what COMMAND is, it's called with one of POINT, BUFFER,
or WINDOW as arguments."
- (let* ((p (text-properties-at point))
- (b (plist-get p 'erc-nicklist-channel)))
- (if (memq command '(erc-nicklist-quit ignore))
- (funcall command window)
- ;; EEEK! Horrble, but it's the only way we can ensure the
- ;; response goes to the correct buffer.
- (erc-set-active-buffer b)
- (with-current-buffer b
- (funcall command (plist-get p 'erc-nicklist-nick))))))
+ (when command
+ (let* ((p (text-properties-at point))
+ (b (plist-get p 'erc-nicklist-channel)))
+ (if (memq command '(erc-nicklist-quit ignore))
+ (funcall command window)
+ ;; EEEK! Horrble, but it's the only way we can ensure the
+ ;; response goes to the correct buffer.
+ (erc-set-active-buffer b)
+ (switch-to-buffer-other-window b)
+ (funcall command (plist-get p 'erc-nicklist-nick))))))
+
+(defun erc-nicklist-cmd-QUERY (user &optional server)
+ "Opens a query buffer with USER."
+ ;; FIXME: find a way to switch to that buffer afterwards...
+ (let ((send (if server
+ (format "QUERY %s %s" user server)
+ (format "QUERY %s" user))))
+ (erc-cmd-QUERY user)
+ t))
+(defun erc-nicklist-kbd-cmd-QUERY (&optional window)
+ (interactive)
+ (let* ((p (text-properties-at (point)))
+ (server (plist-get p 'erc-nicklist-channel))
+ (nick (plist-get p 'erc-nicklist-nick))
+ (nick (or (and (string-match "(\\(.*\\))" nick)
+ (match-string 1 nick))
+ nick))
+ (nick (or (and (string-match "\\+\\(.*\\)" nick)
+ (match-string 1 nick))
+ nick))
+ (send (format "QUERY %s %s" nick server)))
+ (switch-to-buffer-other-window server)
+ (erc-cmd-QUERY nick)))
+
+
(defvar erc-nicklist-menu
(let ((map (make-sparse-keymap "Action")))
(define-key map [erc-cmd-WHOIS]
@@ -160,9 +331,9 @@ or WINDOW as arguments."
(define-key map [erc-cmd-DEOP]
'("Deop" . erc-cmd-DEOP))
(define-key map [erc-cmd-MSG]
- '("Message" . erc-cmd-MSG))
- (define-key map [erc-cmd-QUERY]
- '("Query" . erc-cmd-QUERY))
+ '("Message" . erc-cmd-MSG)) ;; TODO!
+ (define-key map [erc-nicklist-cmd-QUERY]
+ '("Query" . erc-nicklist-kbd-cmd-QUERY))
(define-key map [ignore]
'("Cancel" . ignore))
(define-key map [erc-nicklist-quit]
@@ -181,28 +352,66 @@ Deletes WINDOW and stops updating the ni
(kill-this-buffer)
(remove-hook 'erc-channel-members-changed-hook 'erc-nicklist-update))))
+
+(defun erc-nicklist-kbd-menu ()
+ "Show the ERC nicklist menu."
+ (interactive)
+ (let* ((point (point))
+ (window (selected-window))
+ (buffer (current-buffer)))
+ (with-current-buffer buffer
+ (erc-nicklist-call-erc-command
+ (car (x-popup-menu point
+ erc-nicklist-menu))
+ point
+ buffer
+ window))))
+
(defun erc-nicklist-menu (&optional arg)
"Show the ERC nicklist menu.
ARG is a parametrized event (see `interactive')."
(interactive "e")
(let* ((point (nth 1 (cadr arg)))
- (window (caadr arg))
- (buffer (window-buffer window)))
+ (window (caadr arg))
+ (buffer (window-buffer window)))
(with-current-buffer buffer
(erc-nicklist-call-erc-command
(car (x-popup-menu arg
- erc-nicklist-menu))
+ erc-nicklist-menu))
point
buffer
window))))
-
-(defun erc-nicklist-channel-nicks (channel)
- "Return a sorted list of all nicks on CHANNEL."
- (let ((nicks (with-current-buffer channel
- (erc-get-channel-nickname-list))))
- (sort nicks #'string<)))
+
+(defun erc-nicklist-channel-users-info (channel)
+ "Return a nick-sorted list of all users on CHANNEL.
+Result are elements in the form (SERVER-USER . CHANNEL-USER). The
+list has all the voiced users according to
+`erc-nicklist-voiced-position'."
+ (let* ((nicks (erc-sort-channel-users-alphabetically
+ (with-current-buffer channel (erc-get-channel-user-list)))))
+ (if erc-nicklist-voiced-position
+ (let ((voiced-nicks (remove-if #'(lambda (x)
+ (erc-channel-user-voice (cdr x)))
+ nicks))
+ (devoiced-nicks (remove-if-not #'(lambda (x)
+ (erc-channel-user-voice
+ (cdr x)))
+ nicks)))
+ (cond ((eq erc-nicklist-voiced-position 'top)
+ (append devoiced-nicks voiced-nicks))
+ ((eq erc-nicklist-voiced-position 'bottom)
+ (append voiced-nicks devoiced-nicks))))
+ nicks)))
+
+
+
(provide 'erc-nicklist)
;;; erc-nicklist.el ends here
+;;
+;; Local Variables:
+;; indent-tabs-mode: t
+;; tab-width: 8
+;; End:
1.8 +38 -25 XEmacs/packages/xemacs-packages/erc/erc-nickserv.el
Index: erc-nickserv.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-nickserv.el,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- erc-nickserv.el 2005/04/10 14:47:37 1.7
+++ erc-nickserv.el 2005/10/15 18:15:29 1.8
@@ -13,9 +13,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -52,7 +52,7 @@
;;
;; If you'd rather not identify yourself automatically but would like access
;; to the functions contained in this file, just load this file without
-;; enabling `erc-services-mode'.
+;; enabling `erc-services-mode'.
;;
;;; Code:
@@ -60,7 +60,7 @@
(require 'erc)
(require 'erc-nets)
-(defconst erc-nickserv-version "$Revision: 1.22 $"
+(defconst erc-nickserv-version "$Revision: 1.26 $"
"ERC NickServ revision.")
;; Customization:
@@ -209,10 +209,23 @@ Example of use:
"IDENTIFY"
nil
"")
- (Austnet "NickOP!service(a)austnet.org"
+ (Austnet
+ "NickOP!service(a)austnet.org"
"/msg\\s-NickOP(a)austnet.org\\s-identify\\s-<password>"
"nickop(a)austnet.org"
"identify"
+ nil)
+ (Azzurra
+ "NickServ!service(a)azzurra.org"
+ "/ns\\s-IDENTIFY\\s-password"
+ "NickServ"
+ "IDENTIFY"
+ nil)
+ (OFTC
+ "NickServ!services(a)services.oftc.net"
+ "/msg\\s-NickServ\\s-IDENTIFY\\s-\^_password"
+ "NickServ"
+ "IDENTIFY"
nil))
"Alist of NickServer details, sorted by network.
Every element in the list has the form
@@ -235,7 +248,7 @@ ANSWER is the command to use for the ans
(regexp :tag "Identify request sent by Nickserv")
(string :tag "Identify to")
(string :tag "Identify keyword")
- (boolean :tag "Use current-nick in identify message?")
+ (boolean :tag "Use current nick in identify message?")
(choice :tag "Command to use (optional)"
(string :tag "Command")
(const :tag "No special command necessary" nil)))))
@@ -249,35 +262,36 @@ specifically asked the user to IDENTIFY.
If `erc-prompt-for-nickserv-password' is non-nil, prompt the user for the
password for this nickname, otherwise try to send it automatically."
(unless (and (null erc-nickserv-passwords)
- (null erc-prompt-for-nickserv-password))
+ (null erc-prompt-for-nickserv-password))
(let* ((network (erc-network))
- (nickserv (nth 1 (assoc network erc-nickserv-alist)))
- (identify-regex (nth 2 (assoc network erc-nickserv-alist)))
- (sspec (erc-response.sender parsed))
- (nick (car (erc-response.command-args parsed)))
- (msg (erc-response.contents parsed)))
+ (nickserv (nth 1 (assoc network erc-nickserv-alist)))
+ (identify-regex (nth 2 (assoc network erc-nickserv-alist)))
+ (sspec (erc-response.sender parsed))
+ (nick (car (erc-response.command-args parsed)))
+ (msg (erc-response.contents parsed)))
;; continue only if we're sure it's the real nickserv for this network
;; and it's asked us to identify
(when (and nickserv (equal sspec nickserv)
- (string-match identify-regex msg))
- (erc-log "NickServ IDENTIFY request detected")
- (erc-nickserv-call-identify-function nick)
+ (string-match identify-regex msg))
+ (erc-log "NickServ IDENTIFY request detected")
+ (erc-nickserv-call-identify-function nick)
nil))))
(defun erc-nickserv-identify-on-connect (server nick)
"Identify to Nickserv after the connection to the server is established."
(unless (and (null erc-nickserv-passwords)
- (null erc-prompt-for-nickserv-password))
+ (null erc-prompt-for-nickserv-password))
(erc-nickserv-call-identify-function nick)))
(defun erc-nickserv-identify-on-nick-change (nick old-nick)
"Identify to Nickserv whenever your nick changes."
(unless (and (null erc-nickserv-passwords)
- (null erc-prompt-for-nickserv-password))
+ (null erc-prompt-for-nickserv-password))
(erc-nickserv-call-identify-function nick)))
(defun erc-nickserv-call-identify-function (nickname)
- "Call `erc-nickserv-identify' interactively or run it with NICKNAME's
password.
+ "Call `erc-nickserv-identify' interactively or run it with NICKNAME's
+password.
The action is determined by the value of `erc-prompt-for-nickserv-password'."
(if erc-prompt-for-nickserv-password
(call-interactively 'erc-nickserv-identify)
@@ -293,11 +307,11 @@ The action is determined by the value of
When called interactively, read the password using `read-passwd'."
(interactive
(list (read-passwd
- (format "NickServ password for %s on %s (RET to cancel): "
- (erc-current-nick)
- (or (and (erc-network)
- (symbol-name (erc-network)))
- "Unknown network")))))
+ (format "NickServ password for %s on %s (RET to cancel): "
+ (erc-current-nick)
+ (or (and (erc-network)
+ (symbol-name (erc-network)))
+ "Unknown network")))))
(when (and password (not (string= "" password)))
(let* ((erc-auto-discard-away nil)
(network (erc-network))
@@ -318,5 +332,4 @@ When called interactively, read the pass
;; Local Variables:
;; indent-tabs-mode: t
;; tab-width: 8
-;; standard-indent: 4
;; End:
1.6 +29 -15 XEmacs/packages/xemacs-packages/erc/erc-notify.el
Index: erc-notify.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-notify.el,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- erc-notify.el 2005/04/10 14:47:37 1.5
+++ erc-notify.el 2005/10/15 18:15:29 1.6
@@ -16,9 +16,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -39,7 +39,8 @@
:group 'erc)
(defcustom erc-notify-list nil
- "*List of nicknames you want to be notified about online/offline status
change."
+ "*List of nicknames you want to be notified about online/offline
+status change."
:group 'erc-notify
:type '(repeat string))
@@ -114,7 +115,8 @@ changes."
(erc-once-with-server-event
303
'(let* ((server (erc-response.sender parsed))
- (ison-list (delete "" (split-string (erc-response.contents parsed))))
+ (ison-list (delete "" (split-string
+ (erc-response.contents parsed))))
(new-list ison-list)
(old-list (with-current-buffer (erc-server-buffer)
erc-last-ison)))
@@ -134,7 +136,7 @@ changes."
(setq old-list (cdr old-list)))
(setq erc-last-ison ison-list)
t))
- (erc-send-command
+ (erc-server-send
(concat "ISON " (mapconcat 'identity erc-notify-list "
")))
(setq erc-last-ison-time now)))
@@ -147,7 +149,8 @@ to `erc-last-ison' to prevent any furthe
(not (erc-member-ignore-case nick erc-last-ison)))
(add-to-list 'erc-last-ison nick)
(run-hook-with-args 'erc-notify-signon-hook
- erc-announced-server-name nick)
+ (or erc-server-announced-name erc-session-server)
+ nick)
(erc-display-message
parsed 'notice proc
'notify_on ?n nick ?m (erc-network-name)))
@@ -162,7 +165,8 @@ to `erc-last-ison' to prevent any furthe
(not (erc-member-ignore-case nick erc-last-ison)))
(add-to-list 'erc-last-ison nick)
(run-hook-with-args 'erc-notify-signon-hook
- erc-announced-server-name nick)
+ (or erc-server-announced-name erc-session-server)
+ nick)
(erc-display-message
parsed 'notice proc
'notify_on ?n nick ?m (erc-network-name)))
@@ -177,10 +181,12 @@ nick from `erc-last-ison' to prevent any
(erc-member-ignore-case nick erc-last-ison))
(setq erc-last-ison (delete (find nick erc-last-ison
:test #'(lambda (x y)
- (string= (erc-downcase x) (erc-downcase y))))
+ (string= (erc-downcase x)
+ (erc-downcase y))))
erc-last-ison))
(run-hook-with-args 'erc-notify-signoff-hook
- erc-announced-server-name nick)
+ (or erc-server-announced-name erc-session-server)
+ nick)
(erc-display-message
parsed 'notice proc
'notify_off ?n nick ?m (erc-network-name)))
@@ -205,20 +211,23 @@ with args, toggle notify status of peopl
'notify_current ?l ison))))
((string= (car args) "-l")
(erc-display-message nil 'notice 'active
- 'notify_list ?l (mapconcat 'identity erc-notify-list " ")))
+ 'notify_list ?l (mapconcat 'identity erc-notify-list
+ " ")))
(t
(while args
(if (erc-member-ignore-case (car args) erc-notify-list)
(progn
(setq erc-notify-list (delete (car args) erc-notify-list))
- ;; Remove the nick from the value of erc-last-ison in every server buffer.
- ;; This prevents seeing a signoff notification for a nick that you have
- ;; just _removed_ from your notify list.
+ ;; Remove the nick from the value of erc-last-ison in
+ ;; every server buffer. This prevents seeing a signoff
+ ;; notification for a nick that you have just _removed_
+ ;; from your notify list.
(dolist (buf (erc-buffer-list))
(with-current-buffer buf
(if (erc-server-buffer-p)
(setq erc-last-ison (delete (car args) erc-last-ison))))))
- (setq erc-notify-list (cons (erc-string-no-properties (car args)) erc-notify-list)))
+ (setq erc-notify-list (cons (erc-string-no-properties (car args))
+ erc-notify-list)))
(setq args (cdr args)))
(erc-display-message
nil 'notice 'active
@@ -234,3 +243,8 @@ with args, toggle notify status of peopl
(provide 'erc-notify)
;;; erc-notify.el ends here
+;;
+;; Local Variables:
+;; indent-tabs-mode: t
+;; tab-width: 8
+;; End:
1.5 +6 -4 XEmacs/packages/xemacs-packages/erc/erc-page.el
Index: erc-page.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-page.el,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- erc-page.el 2005/04/10 14:47:37 1.4
+++ erc-page.el 2005/10/15 18:15:29 1.5
@@ -14,8 +14,8 @@
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
-;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-;; 02111-1307, USA.
+;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301 USA
;;; Commentary:
@@ -82,7 +82,7 @@ inserted into the server buffer."
(if erc-page-function
(funcall erc-page-function nick page-msg)
;; if no function is defined
- (message text)
+ (message "%s" text)
(beep))
;; insert text into buffer
(erc-display-message
@@ -93,10 +93,12 @@ inserted into the server buffer."
"Send a CTCP page to the user given as the first word in LINE.
The rest of LINE is the message to send. Note that you will only
receive pages if `erc-page-mode' is on."
- (when (string-match "^\\s-*\\(\\S-+\\)\\s-*\\s-*\\(\\S-+\\)" line)
+ (when (string-match "^\\s-*\\(\\S-+\\) ?\\(.*\\)" line)
(let ((nick (match-string 1 line))
(msg (match-string 2 line)))
(erc-cmd-CTCP nick "PAGE" msg))))
+
+(put 'erc-cmd-PAGE 'do-not-parse-args t)
(provide 'erc-page)
1.5 +26 -22 XEmacs/packages/xemacs-packages/erc/erc-pcomplete.el
Index: erc-pcomplete.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-pcomplete.el,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- erc-pcomplete.el 2005/04/10 14:47:37 1.4
+++ erc-pcomplete.el 2005/10/15 18:15:29 1.5
@@ -18,9 +18,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -44,7 +44,7 @@
(require 'erc-compat)
(require 'time-date)
-(defconst erc-pcomplete-version "$Revision: 1.28 $"
+(defconst erc-pcomplete-version "$Revision: 1.30 $"
"ERC pcomplete mode revision")
(defgroup erc-pcomplete nil
@@ -77,8 +77,8 @@ the most recent speakers are listed firs
(interactive)
(when (> (point) (erc-beg-of-input-line))
(let ((last-command (if (eq last-command 'erc-complete-word)
- 'pcomplete
- last-command)))
+ 'pcomplete
+ last-command)))
(call-interactively 'pcomplete))
t))
@@ -149,7 +149,7 @@ the most recent speakers are listed firs
(defun pcomplete/erc-mode/MSG ()
(pcomplete-here (append (pcomplete-erc-all-nicks)
- (pcomplete-erc-channels)))
+ (pcomplete-erc-channels)))
(while (pcomplete-here (pcomplete-erc-nicks))))
(defun pcomplete/erc-mode/NAMES ()
@@ -167,7 +167,7 @@ the most recent speakers are listed firs
(defun pcomplete/erc-mode/QUERY ()
(pcomplete-here (append (pcomplete-erc-all-nicks)
- (pcomplete-erc-channels)))
+ (pcomplete-erc-channels)))
(while (pcomplete-here (pcomplete-erc-nicks)))
)
@@ -189,8 +189,8 @@ the most recent speakers are listed firs
"Returns a list of strings of the defined user commands."
(let ((case-fold-search nil))
(mapcar (lambda (x)
- (concat "/" (downcase (substring (symbol-name x) 8))))
- (apropos-internal "erc-cmd-[A-Z]+"))))
+ (concat "/" (downcase (substring (symbol-name x) 8))))
+ (apropos-internal "erc-cmd-[A-Z]+"))))
(defun pcomplete-erc-ops ()
"Returns a list of nicks with ops."
@@ -225,7 +225,7 @@ the most recent speakers are listed firs
(defun pcomplete-erc-all-nicks (&optional postfix)
"Returns a list of all nicks on the current server."
(let (nicks)
- (with-current-buffer (process-buffer erc-process)
+ (with-current-buffer (process-buffer erc-server-process)
(maphash (lambda (nick user)
(setq nicks (cons (concat nick postfix) nicks)))
erc-server-users))
@@ -234,7 +234,7 @@ the most recent speakers are listed firs
(defun pcomplete-erc-channels ()
"Returns a list of channels associated with the current server."
(mapcar (lambda (buf) (with-current-buffer buf (erc-default-target)))
- (erc-channel-list erc-process)))
+ (erc-channel-list erc-server-process)))
;;; Functions for parsing
@@ -249,22 +249,26 @@ the most recent speakers are listed firs
These are the words from the beginning of the line after the prompt
up to where point is right now."
(let* ((start (save-excursion (erc-bol) (point)))
- (end (point))
- args beginnings)
+ (end (point))
+ args beginnings)
(save-excursion
(if (< (skip-chars-backward " \t\n" start) 0)
- (setq args '("")
- beginnings (list end)))
+ (setq args '("")
+ beginnings (list end)))
(setq end (point))
(while (< (skip-chars-backward "^ \t\n" start) 0)
- (setq beginnings (cons (point) beginnings)
- args (cons (buffer-substring-no-properties
- (point) end)
- args))
- (skip-chars-backward " \t\n" start)
- (setq end (point))))
+ (setq beginnings (cons (point) beginnings)
+ args (cons (buffer-substring-no-properties
+ (point) end)
+ args))
+ (skip-chars-backward " \t\n" start)
+ (setq end (point))))
(cons args beginnings)))
(provide 'erc-pcomplete)
;;; erc-pcomplete.el ends here
+;;
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; End:
1.6 +4 -4 XEmacs/packages/xemacs-packages/erc/erc-ring.el
Index: erc-ring.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-ring.el,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- erc-ring.el 2005/06/05 15:47:02 1.5
+++ erc-ring.el 2005/10/15 18:15:29 1.6
@@ -17,9 +17,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -37,7 +37,7 @@
(require 'comint)
(require 'ring)
-(defvar erc-ring-version "$Revision: 1.17 $"
+(defvar erc-ring-version "$Revision: 1.18 $"
"ERC ring revision")
;;;###autoload (autoload 'erc-ring-mode "erc-ring" nil t)
1.4 +2 -2 XEmacs/packages/xemacs-packages/erc/erc-sound.el
Index: erc-sound.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-sound.el,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- erc-sound.el 2005/04/10 14:47:38 1.3
+++ erc-sound.el 2005/10/15 18:15:29 1.4
@@ -14,8 +14,8 @@
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
-;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-;; 02111-1307, USA.
+;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301 USA
;;; Commentary:
1.7 +24 -23 XEmacs/packages/xemacs-packages/erc/erc-speedbar.el
Index: erc-speedbar.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-speedbar.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- erc-speedbar.el 2005/04/10 14:47:38 1.6
+++ erc-speedbar.el 2005/10/15 18:15:29 1.7
@@ -16,9 +16,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -37,7 +37,7 @@
(require 'speedbar)
(condition-case nil (require 'dframe) (error nil))
-(defconst erc-speedbar-version "$Revision: 1.18 $"
+(defconst erc-speedbar-version "$Revision: 1.20 $"
"ERC Speedbar version.")
;;; Customization:
@@ -112,7 +112,7 @@ This will add a speedbar major display m
(erase-buffer)
(let (serverp chanp)
(with-current-buffer buffer
- (setq serverp (eq buffer (process-buffer erc-process)))
+ (setq serverp (eq buffer (process-buffer erc-server-process)))
(setq chanp (erc-channel-p (erc-default-target)))
(setq queryp (erc-query-buffer-p)))
(cond (serverp
@@ -127,9 +127,10 @@ This will add a speedbar major display m
(defun erc-speedbar-server-buttons (directory depth)
"Insert the initial list of servers you are connected to."
- (let ((servers (erc-buffer-list (lambda ()
- (eq (current-buffer)
- (process-buffer erc-process))))))
+ (let ((servers (erc-buffer-list
+ (lambda ()
+ (eq (current-buffer)
+ (process-buffer erc-server-process))))))
(when servers
(speedbar-with-writable
(dolist (server servers)
@@ -156,11 +157,12 @@ This will add a speedbar major display m
(defun erc-speedbar-channel-buttons (directory depth server-buffer)
(when (get-buffer server-buffer)
- (let* ((proc (with-current-buffer server-buffer erc-process))
- (targets (erc-buffer-list (lambda ()
- (not (eq (process-buffer erc-process)
- (current-buffer))))
- proc)))
+ (let* ((proc (with-current-buffer server-buffer erc-server-process))
+ (targets (erc-buffer-list
+ (lambda ()
+ (not (eq (process-buffer erc-server-process)
+ (current-buffer))))
+ proc)))
(when targets
(speedbar-with-writable
(dolist (target targets)
@@ -190,21 +192,21 @@ INDENT is the current indentation level.
(end-of-line) (forward-char 1)
(let ((modes (with-current-buffer channel
(concat (apply 'concat
- channel-modes)
- (cond ((and channel-user-limit channel-key)
+ erc-channel-modes)
+ (cond ((and erc-channel-user-limit erc-channel-key)
(if erc-show-channel-key-p
- (format "lk %.0f %s" channel-user-limit channel-key)
- (format "kl %.0f" channel-user-limit)))
- (channel-user-limit
+ (format "lk %.0f %s" erc-channel-user-limit erc-channel-key)
+ (format "kl %.0f" erc-channel-user-limit)))
+ (erc-channel-user-limit
;; Emacs has no bignums
- (format "l %.0f" channel-user-limit))
- (channel-key
+ (format "l %.0f" erc-channel-user-limit))
+ (erc-channel-key
(if erc-show-channel-key-p
- (format "k %s" channel-key)
+ (format "k %s" erc-channel-key)
"k"))
(t "")))))
(topic (erc-controls-interpret
- (with-current-buffer channel channel-topic))))
+ (with-current-buffer channel erc-channel-topic))))
(speedbar-make-tag-line
'angle ?i nil nil
(concat "Modes: +" modes) nil nil nil
@@ -356,5 +358,4 @@ The INDENT level is ignored."
;; Local Variables:
;; indent-tabs-mode: t
;; tab-width: 8
-;; standard-indent: 4
;; End:
1.3 +16 -11 XEmacs/packages/xemacs-packages/erc/erc-spelling.el
Index: erc-spelling.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-spelling.el,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- erc-spelling.el 2005/04/25 21:47:25 1.2
+++ erc-spelling.el 2005/10/15 18:15:30 1.3
@@ -18,8 +18,8 @@
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
-;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-;; 02111-1307, USA.
+;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301 USA
;;; Commentary:
@@ -32,17 +32,9 @@
(require 'erc)
(require 'flyspell)
-(defconst erc-spelling-version "$Revision: 1.2 $"
+(defconst erc-spelling-version "$Revision: 1.4 $"
"ERC spelling revision.")
-(defcustom erc-spelling-dictionaries nil
- "An alist mapping buffer names to dictionaries.
-The `car' of every cell is a buffer name, the `cadr' is the
-string name of an associated dictionary.
-The dictionary is inherited from server buffers, so if you want a
-default dictionary for some server, you can use a server buffer
-name here.")
-
;;;###autoload (autoload 'erc-spelling-mode "erc-spelling" nil t)
(define-erc-module spelling nil
"Enable flyspell mode in ERC buffers."
@@ -51,6 +43,18 @@ name here.")
((add-hook 'erc-connect-pre-hook 'erc-spelling-init))
((remove-hook 'erc-connect-pre-hook 'erc-spelling-init)))
+(defcustom erc-spelling-dictionaries nil
+ "An alist mapping buffer names to dictionaries.
+The `car' of every cell is a buffer name, the `cadr' is the
+string name of an associated dictionary.
+The dictionary is inherited from server buffers, so if you want a
+default dictionary for some server, you can use a server buffer
+name here."
+ :type '(choice (const nil)
+ (repeat (cons (string :tag "Buffer")
+ (string :tag "Dictionary"))))
+ :group 'erc-spelling)
+
(defun erc-spelling-init ()
"Enable flyspell mode in an ERC buffer."
(let ((name (downcase (buffer-name)))
@@ -80,4 +84,5 @@ name here.")
(erc-bol))))
(provide 'erc-spelling)
+
;;; erc-spelling.el ends here
1.7 +44 -43 XEmacs/packages/xemacs-packages/erc/erc-stamp.el
Index: erc-stamp.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-stamp.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- erc-stamp.el 2005/04/10 14:47:39 1.6
+++ erc-stamp.el 2005/10/15 18:15:30 1.7
@@ -17,9 +17,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -36,7 +36,7 @@
(require 'erc)
(require 'erc-compat)
-(defconst erc-stamp-version "$Revision: 1.38 $"
+(defconst erc-stamp-version "$Revision: 1.41 $"
"ERC stamp mode revision.")
(defgroup erc-stamp nil
@@ -140,29 +140,30 @@ from entering them and instead jump over
This function is meant to be called from `erc-insert-modify-hook'
or `erc-send-modify-hook'."
- (let ((ct (current-time)))
- (if (fboundp erc-insert-timestamp-function)
- (funcall erc-insert-timestamp-function
- (erc-format-timestamp ct erc-timestamp-format))
- (error "Timestamp function unbound"))
- (when (and (fboundp erc-insert-away-timestamp-function)
- erc-away-timestamp-format
- (with-current-buffer (erc-server-buffer) away)
- (not erc-timestamp-format))
- (funcall erc-insert-away-timestamp-function
- (erc-format-timestamp ct erc-away-timestamp-format)))
- (add-text-properties (point-min) (point-max)
- (list 'timestamp ct))
- (add-text-properties (point-min) (point-max)
- (list 'point-entered 'erc-echo-timestamp))))
+ (unless (get-text-property (point) 'invisible)
+ (let ((ct (current-time)))
+ (if (fboundp erc-insert-timestamp-function)
+ (funcall erc-insert-timestamp-function
+ (erc-format-timestamp ct erc-timestamp-format))
+ (error "Timestamp function unbound"))
+ (when (and (fboundp erc-insert-away-timestamp-function)
+ erc-away-timestamp-format
+ (with-current-buffer (erc-server-buffer) erc-away)
+ (not erc-timestamp-format))
+ (funcall erc-insert-away-timestamp-function
+ (erc-format-timestamp ct erc-away-timestamp-format)))
+ (add-text-properties (point-min) (point-max)
+ (list 'timestamp ct))
+ (add-text-properties (point-min) (point-max)
+ (list 'point-entered 'erc-echo-timestamp)))))
(defun erc-insert-timestamp-left (string)
"Insert timestamps at the beginning of the line."
(goto-char (point-min))
(let* ((ignore-p (and erc-timestamp-only-if-changed-flag
- (string-equal string erc-timestamp-last-inserted)))
- (len (length string))
- (s (if ignore-p (make-string len ? ) string)))
+ (string-equal string erc-timestamp-last-inserted)))
+ (len (length string))
+ (s (if ignore-p (make-string len ? ) string)))
(unless ignore-p (setq erc-timestamp-last-inserted string))
(erc-put-text-property 0 len 'field 'erc-timestamp s)
(insert s)))
@@ -188,8 +189,8 @@ if the timestamp is to be printed to the
the correct column."
:group 'erc-stamp
:type '(choice
- (integer :tag "Column number")
- (const :tag "Unspecified" nil)))
+ (integer :tag "Column number")
+ (const :tag "Unspecified" nil)))
(defun erc-insert-timestamp-right (string)
"Insert timestamp on the right side of the screen.
@@ -214,22 +215,22 @@ be printed just before the window-width.
(goto-char (point-max))
(forward-char -1);; before the last newline
(let* ((current-window (get-buffer-window (current-buffer)))
- (pos (cond
+ (pos (cond
(erc-timestamp-right-column
(+ erc-timestamp-right-column (length string)))
- ((and (boundp 'erc-fill-mode)
- erc-fill-mode
- (boundp 'erc-fill-column))
- (1+ erc-fill-column))
- (current-window
- (- (window-width current-window)
- 1))
- (fill-column
- (1+ fill-column))
- (t
- (- (window-width)
- 1))))
- (from (point)))
+ ((and (boundp 'erc-fill-mode)
+ erc-fill-mode
+ (boundp 'erc-fill-column))
+ (1+ erc-fill-column))
+ (current-window
+ (- (window-width current-window)
+ 1))
+ (fill-column
+ (1+ fill-column))
+ (t
+ (- (window-width)
+ 1))))
+ (from (point)))
(setq pos (- pos (length string)))
(if (= pos (indent-to pos))
(insert string)
@@ -237,7 +238,7 @@ be printed just before the window-width.
(indent-to pos)
(insert string))
(erc-put-text-property from (1+ (point)) 'field 'erc-timestamp)
- (erc-put-text-property from (1+ (point)) 'rear-nonsticky t))))
+ (erc-put-text-property from (1+ (point)) 'rear-nonsticky t))))
;; for testing: (setq erc-timestamp-only-if-changed-flag nil)
@@ -248,11 +249,12 @@ Return the empty string if FORMAT is nil
(let ((ts (format-time-string format time)))
(erc-put-text-property 0 (length ts) 'face 'erc-timestamp-face ts)
(erc-put-text-property 0 (length ts) 'invisible 'timestamp ts)
- (erc-put-text-property 0 (length ts) 'isearch-open-invisible 'timestamp ts)
+ (erc-put-text-property 0 (length ts)
+ 'isearch-open-invisible 'timestamp ts)
;; N.B. Later use categories instead of this harmless, but
;; inelegant, hack. -- BPT
- (when erc-timestamp-intangible
- (erc-put-text-property 0 (length ts) 'intangible t ts))
+ (when erc-timestamp-intangible
+ (erc-put-text-property 0 (length ts) 'intangible t ts))
ts)
""))
@@ -303,5 +305,4 @@ NOW is position of point currently."
;; Local Variables:
;; indent-tabs-mode: t
;; tab-width: 8
-;; standard-indent: 4
;; End:
1.9 +142 -133 XEmacs/packages/xemacs-packages/erc/erc-track.el
Index: erc-track.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-track.el,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- erc-track.el 2005/06/05 15:47:03 1.8
+++ erc-track.el 2005/10/15 18:15:30 1.9
@@ -17,9 +17,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
@@ -39,7 +39,7 @@
;;; Code:
-(defconst erc-track-version "$Revision: 1.77 $"
+(defconst erc-track-version "$Revision: 1.79 $"
"ERC track mode revision")
(defgroup erc-track nil
@@ -65,7 +65,8 @@ Activity means that there was no user in
:type '(choice (const :tag "All frames" t)
(const :tag "All visible frames" visible)
(const :tag "Only the selected frame" nil)
- (const :tag "Only the selected frame if it was active" active)))
+ (const :tag "Only the selected frame if it was active"
+ active)))
(defcustom erc-track-exclude nil
"A list targets (channel names or query targets) which should not be
tracked."
@@ -173,14 +174,14 @@ Choices are:
Any other value means add to the end of `global-mode-string'."
:group 'erc-track
:type '(choice (const :tag "Just before mode information"
before-modes)
- (const :tag "Just after mode information" after-modes)
- (const :tag "After all other information" nil))
+ (const :tag "Just after mode information" after-modes)
+ (const :tag "After all other information" nil))
:set (lambda (sym val)
- (set sym val)
- (when (and (boundp 'erc-track-mode)
- erc-track-mode)
- (erc-track-remove-from-mode-line)
- (erc-track-add-to-mode-line val))))
+ (set sym val)
+ (when (and (boundp 'erc-track-mode)
+ erc-track-mode)
+ (erc-track-remove-from-mode-line)
+ (erc-track-add-to-mode-line val))))
(defun erc-modified-channels-object (strings)
"Generate a new `erc-modified-channels-object' based on STRINGS.
@@ -188,16 +189,16 @@ If STRINGS is nil, we initialize `erc-mo
an appropriate initial value for this flavor of Emacs."
(if strings
(if (featurep 'xemacs)
- (let ((e-m-c-s '("[")))
- (push (cons (extent-at 0 (car strings)) (car strings))
- e-m-c-s)
- (dolist (string (cdr strings))
- (push "," e-m-c-s)
- (push (cons (extent-at 0 string) string)
- e-m-c-s))
- (push "] " e-m-c-s)
- (reverse e-m-c-s))
- (concat (if (eq erc-track-position-in-mode-line 'after-modes)
+ (let ((e-m-c-s '("[")))
+ (push (cons (extent-at 0 (car strings)) (car strings))
+ e-m-c-s)
+ (dolist (string (cdr strings))
+ (push "," e-m-c-s)
+ (push (cons (extent-at 0 string) string)
+ e-m-c-s))
+ (push "] " e-m-c-s)
+ (reverse e-m-c-s))
+ (concat (if (eq erc-track-position-in-mode-line 'after-modes)
"[" " [")
(mapconcat 'identity (nreverse strings) ",")
(if (eq erc-track-position-in-mode-line 'before-modes)
@@ -225,9 +226,9 @@ while the buffer was not visible.")
"Remove `erc-track-modified-channels' from the mode-line"
(when (boundp 'mode-line-modes)
(setq mode-line-modes
- (remove '(t erc-modified-channels-object) mode-line-modes)))
+ (remove '(t erc-modified-channels-object) mode-line-modes)))
(setq global-mode-string
- (delq 'erc-modified-channels-object global-mode-string)))
+ (delq 'erc-modified-channels-object global-mode-string)))
(defun erc-track-add-to-mode-line (position)
"Add `erc-track-modified-channels' to POSITION in the mode-line.
@@ -235,19 +236,19 @@ See `erc-track-position-in-mode-line' fo
;; CVS Emacs has a new format string, and global-mode-string
;; is very far to the right.
(cond ((and (eq position 'before-modes)
- (boundp 'mode-line-modes))
- (add-to-list 'mode-line-modes
- '(t erc-modified-channels-object)))
- ((and (eq position 'after-modes)
- (boundp 'mode-line-modes))
- (add-to-list 'mode-line-modes
- '(t erc-modified-channels-object) t))
- (t
- (when (not global-mode-string)
- (setq global-mode-string '(""))) ; Padding for mode-line wart
- (add-to-list 'global-mode-string
- 'erc-modified-channels-object
- t))))
+ (boundp 'mode-line-modes))
+ (add-to-list 'mode-line-modes
+ '(t erc-modified-channels-object)))
+ ((and (eq position 'after-modes)
+ (boundp 'mode-line-modes))
+ (add-to-list 'mode-line-modes
+ '(t erc-modified-channels-object) t))
+ (t
+ (when (not global-mode-string)
+ (setq global-mode-string '(""))) ; Padding for mode-line wart
+ (add-to-list 'global-mode-string
+ 'erc-modified-channels-object
+ t))))
;;; Shortening of names
@@ -329,7 +330,7 @@ START is the minimum length of the name
(let* ((others (delete str (copy-sequence strings)))
(maxlen (length str))
(i (min start
- (length str)))
+ (length str)))
candidate
done)
(if (and (functionp predicate) (not (funcall predicate str)))
@@ -369,25 +370,25 @@ START is the minimum length of the name
(and
;; verify examples from the doc strings
(equal (let ((erc-track-shorten-aggressively nil))
- (erc-unique-channel-names
- '("#emacs" "#vi" "#electronica"
"#folk")
- '("#emacs" "#vi")))
- '("#em" "#vi")) ; emacs is different from
electronica
+ (erc-unique-channel-names
+ '("#emacs" "#vi" "#electronica"
"#folk")
+ '("#emacs" "#vi")))
+ '("#em" "#vi")) ; emacs is different from electronica
(equal (let ((erc-track-shorten-aggressively t))
- (erc-unique-channel-names
- '("#emacs" "#vi" "#electronica"
"#folk")
- '("#emacs" "#vi")))
- '("#em" "#v")) ; vi is shortened by one
letter
+ (erc-unique-channel-names
+ '("#emacs" "#vi" "#electronica"
"#folk")
+ '("#emacs" "#vi")))
+ '("#em" "#v")) ; vi is shortened by one letter
(equal (let ((erc-track-shorten-aggressively 'max))
- (erc-unique-channel-names
- '("#emacs" "#vi" "#electronica"
"#folk")
- '("#emacs" "#vi")))
- '("#e" "#v")) ; emacs need not be different from
electronica
+ (erc-unique-channel-names
+ '("#emacs" "#vi" "#electronica"
"#folk")
+ '("#emacs" "#vi")))
+ '("#e" "#v")) ; emacs need not be different from
electronica
(equal (let ((erc-track-shorten-aggressively nil))
- (erc-unique-channel-names
- '("#linux-de" "#linux-fr")
- '("#linux-de" "#linux-fr")))
- '("#linux-de" "#linux-fr")) ; shortening by one letter
is too aggressive
+ (erc-unique-channel-names
+ '("#linux-de" "#linux-fr")
+ '("#linux-de" "#linux-fr")))
+ '("#linux-de" "#linux-fr")) ; shortening by one letter is too
aggressive
(equal (let ((erc-track-shorten-aggressively t))
(erc-unique-channel-names
'("#linux-de" "#linux-fr")
@@ -395,66 +396,66 @@ START is the minimum length of the name
'("#linux-d" "#linux-f")); now we want to be aggressive
;; specific problems
(equal (let ((erc-track-shorten-aggressively nil))
- (erc-unique-channel-names
- '("#dunnet" "#lisp" "#sawfish"
"#fsf" "#guile"
- "#testgnome" "#gnu" "#fsbot"
"#hurd" "#hurd-bunny"
- "#emacs")
- '("#hurd-bunny" "#hurd" "#sawfish"
"#lisp")))
- '("#hurd-" "#hurd" "#s" "#l"))
+ (erc-unique-channel-names
+ '("#dunnet" "#lisp" "#sawfish" "#fsf"
"#guile"
+ "#testgnome" "#gnu" "#fsbot" "#hurd"
"#hurd-bunny"
+ "#emacs")
+ '("#hurd-bunny" "#hurd" "#sawfish"
"#lisp")))
+ '("#hurd-" "#hurd" "#s" "#l"))
(equal (let ((erc-track-shorten-aggressively nil))
- (erc-unique-substrings
- '("#emacs" "#vi" "#electronica"
"#folk")))
- '("#em" "#vi" "#el" "#f"))
+ (erc-unique-substrings
+ '("#emacs" "#vi" "#electronica"
"#folk")))
+ '("#em" "#vi" "#el" "#f"))
(equal (let ((erc-track-shorten-aggressively t))
- (erc-unique-substrings
- '("#emacs" "#vi" "#electronica"
"#folk")))
- '("#em" "#v" "#el" "#f"))
+ (erc-unique-substrings
+ '("#emacs" "#vi" "#electronica"
"#folk")))
+ '("#em" "#v" "#el" "#f"))
(equal (let ((erc-track-shorten-aggressively nil))
- (erc-unique-channel-names
- '("#emacs" "#burse" "+linux.de"
"#starwars"
- "#bitlbee" "+burse" "#ratpoison")
- '("+linux.de" "#starwars" "#burse")))
- '("+l" "#s" "#bu"))
+ (erc-unique-channel-names
+ '("#emacs" "#burse" "+linux.de"
"#starwars"
+ "#bitlbee" "+burse" "#ratpoison")
+ '("+linux.de" "#starwars" "#burse")))
+ '("+l" "#s" "#bu"))
(equal (let ((erc-track-shorten-aggressively nil))
- (erc-unique-channel-names
- '("fsbot" "#emacs" "deego")
- '("fsbot")))
- '("fs"))
+ (erc-unique-channel-names
+ '("fsbot" "#emacs" "deego")
+ '("fsbot")))
+ '("fs"))
(equal (let ((erc-track-shorten-aggressively nil))
- (erc-unique-channel-names
- '("fsbot" "#emacs" "deego")
- '("fsbot")
- (lambda (s)
- (> (length s) 4))
- 1))
- '("f"))
+ (erc-unique-channel-names
+ '("fsbot" "#emacs" "deego")
+ '("fsbot")
+ (lambda (s)
+ (> (length s) 4))
+ 1))
+ '("f"))
(equal (let ((erc-track-shorten-aggressively nil))
- (erc-unique-channel-names
- '("fsbot" "#emacs" "deego")
- '("fsbot")
- (lambda (s)
- (> (length s) 4))
- 2))
- '("fs"))
+ (erc-unique-channel-names
+ '("fsbot" "#emacs" "deego")
+ '("fsbot")
+ (lambda (s)
+ (> (length s) 4))
+ 2))
+ '("fs"))
(let ((erc-track-shorten-aggressively nil))
(equal (erc-unique-channel-names '("deego" "#hurd"
"#hurd-bunny" "#emacs")
- '("#hurd" "#hurd-bunny"))
- '("#hurd" "#hurd-")))
+ '("#hurd" "#hurd-bunny"))
+ '("#hurd" "#hurd-")))
;; general examples
(let ((erc-track-shorten-aggressively t))
(and (equal (erc-unique-substring-1 "abc" '("ab"
"abcd")) "abcd")
- (not (erc-unique-substring-1 "a" '("xyz"
"xab")))
- (equal (erc-unique-substrings '("abc" "xyz"
"xab"))
- '("ab" "xy" "xa"))
- (equal (erc-unique-substrings '("abc" "abcdefg"))
- '("abc" "abcd"))))
+ (not (erc-unique-substring-1 "a" '("xyz" "xab")))
+ (equal (erc-unique-substrings '("abc" "xyz"
"xab"))
+ '("ab" "xy" "xa"))
+ (equal (erc-unique-substrings '("abc" "abcdefg"))
+ '("abc" "abcd"))))
(let ((erc-track-shorten-aggressively nil))
(and (equal (erc-unique-substring-1 "abc" '("ab"
"abcd")) "abcd")
- (not (erc-unique-substring-1 "a" '("xyz"
"xab")))
- (equal (erc-unique-substrings '("abc" "xyz"
"xab"))
- '("abc" "xyz" "xab"))
- (equal (erc-unique-substrings '("abc" "abcdefg"))
- '("abc" "abcd"))))))
+ (not (erc-unique-substring-1 "a" '("xyz" "xab")))
+ (equal (erc-unique-substrings '("abc" "xyz"
"xab"))
+ '("abc" "xyz" "xab"))
+ (equal (erc-unique-substrings '("abc" "abcdefg"))
+ '("abc" "abcd"))))))
;;; Module
@@ -466,14 +467,15 @@ START is the minimum length of the name
(erc-update-mode-line)
(if (featurep 'xemacs)
(defadvice switch-to-buffer (after erc-update (&rest args) activate)
- (erc-modified-channels-update))
+ (erc-modified-channels-update))
(add-hook 'window-configuration-change-hook
'erc-modified-channels-update))
(add-hook 'erc-insert-post-hook 'erc-track-modified-channels)
(add-hook 'erc-disconnected-hook 'erc-modified-channels-update))
((erc-track-remove-from-mode-line)
(if (featurep 'xemacs)
(ad-disable-advice 'switch-to-buffer 'after 'erc-update)
- (remove-hook 'window-configuration-change-hook
'erc-modified-channels-update))
+ (remove-hook 'window-configuration-change-hook
+ 'erc-modified-channels-update))
(remove-hook 'erc-disconnected-hook 'erc-modified-channels-update)
(remove-hook 'erc-insert-post-hook 'erc-track-modified-channels)))
@@ -483,7 +485,7 @@ START is the minimum length of the name
if you are inactivity."
((if (featurep 'xemacs)
(defadvice switch-to-buffer (after erc-update-when-inactive (&rest args)
activate)
- (erc-user-is-active))
+ (erc-user-is-active))
(add-hook 'window-configuration-change-hook 'erc-user-is-active))
(add-hook 'erc-send-completed-hook 'erc-user-is-active)
(add-hook 'erc-server-001-functions 'erc-user-is-active))
@@ -540,8 +542,8 @@ ARGS are ignored."
(when (or (not (bufferp buffer))
(not (buffer-live-p buffer))
(erc-buffer-visible buffer)
- (not (with-current-buffer buffer
- erc-connected)))
+ (not (with-current-buffer buffer
+ erc-server-connected)))
(erc-modified-channels-remove-buffer buffer))))
erc-modified-channels-alist)
(erc-modified-channels-display)
@@ -621,9 +623,9 @@ Use `erc-make-mode-line-buffer-name' to
counts (cdr counts)
faces (cdr faces)))
(when (featurep 'xemacs)
- (erc-modified-channels-object nil))
+ (erc-modified-channels-object nil))
(setq erc-modified-channels-object
- (erc-modified-channels-object strings)))))
+ (erc-modified-channels-object strings)))))
(defun erc-modified-channels-remove-buffer (buffer)
"Remove BUFFER from `erc-modified-channels-alist'."
@@ -652,15 +654,16 @@ first in that list will be used."
buffer should be added to the modeline as a hidden, modified
channel. Assumes it will only be called when current-buffer
is in `erc-mode'."
- (let ((this-channel (or (erc-default-target) (buffer-name (current-buffer)))))
+ (let ((this-channel (or (erc-default-target)
+ (buffer-name (current-buffer)))))
(if (and (not (erc-buffer-visible (current-buffer)))
(not (member this-channel erc-track-exclude))
- (not (and erc-track-exclude-server-buffer
- (string= this-channel
- (buffer-name (erc-server-buffer)))))
+ (not (and erc-track-exclude-server-buffer
+ (string= this-channel
+ (buffer-name (erc-server-buffer)))))
(not (erc-message-type-member
(or (erc-find-parsed-property)
- (point-min))
+ (point-min))
erc-track-exclude-types)))
;; If the active buffer is not visible (not shown in a
;; window), and not to be excluded, determine the kinds of
@@ -723,8 +726,8 @@ is in `erc-mode'."
(assert
(let ((str "is bold"))
(put-text-property 3 (length str)
- 'face '(bold erc-current-nick-face)
- str)
+ 'face '(bold erc-current-nick-face)
+ str)
(erc-faces-in str)))
(defun erc-find-parsed-property ()
@@ -759,15 +762,16 @@ The default is a colon, resulting in \"#
'newest finds the latest, 'leastactive finds buffer with least unseen
messages,
'mostactive - with most unseen messages."
:group 'erc-track
- :type '(choice (const oldest) (const newest) (const leastactive) (const
mostactive)))
+ :type '(choice (const oldest) (const newest) (const leastactive)
+ (const mostactive)))
(defvar erc-track-last-non-erc-buffer nil
"Stores the name of the last buffer you were in before activating
`erc-track-switch-buffers'")
(defun erc-track-sort-by-activest ()
- "Sorts erc-modified-channels-alist by 'activeness'(count of not seen
messages)
-+of channel"
+ "Sorts erc-modified-channels-alist by 'activeness'
+\(count of not seen messages) of channel"
(setq erc-modified-channels-alist
(sort erc-modified-channels-alist
(lambda (a b) (> (nth 1 a) (nth 1 b))))))
@@ -777,26 +781,26 @@ The default is a colon, resulting in \"#
Negative arguments index in the opposite direction. This direction is
relative to `erc-track-switch-direction'"
(let ((dir erc-track-switch-direction)
- offset)
+ offset)
(if (< arg 0)
- (progn
- (cond
- ((eq 'oldest dir) (setq dir 'newest))
- ((eq 'newest dir) (setq dir 'oldest))
- ((eq 'mostactive dir) (setq dir 'leastactive))
- ((eq 'leastactive dir) (setq dir 'mostacive)))
- (setq arg (* -1 arg))))
+ (progn
+ (cond
+ ((eq 'oldest dir) (setq dir 'newest))
+ ((eq 'newest dir) (setq dir 'oldest))
+ ((eq 'mostactive dir) (setq dir 'leastactive))
+ ((eq 'leastactive dir) (setq dir 'mostacive)))
+ (setq arg (* -1 arg))))
(setq arg (- arg 1))
(setq offset (cond
- ((or (eq 'oldest dir) (eq 'leastactive dir))
- (- (- (length erc-modified-channels-alist) 1) arg))
- (t 0)))
+ ((or (eq 'oldest dir) (eq 'leastactive dir))
+ (- (- (length erc-modified-channels-alist) 1) arg))
+ (t 0)))
;; normalise out of range user input
(if (>= offset (length erc-modified-channels-alist))
- (setq offset (- (length erc-modified-channels-alist) 1))
- (if (< offset 0)
- (setq offset 0))
- (car (nth offset erc-modified-channels-alist)))))
+ (setq offset (- (length erc-modified-channels-alist) 1))
+ (if (< offset 0)
+ (setq offset 0))
+ (car (nth offset erc-modified-channels-alist)))))
(defun erc-track-switch-buffer (arg)
"Switch to the next active ERC buffer, or if there are no active buffers,
@@ -827,3 +831,8 @@ switch back to the last non-ERC buffer v
(provide 'erc-track)
;;; erc-track.el ends here
+;;
+;; Local Variables:
+;; indent-tabs-mode: t
+;; tab-width: 8
+;; End:
1.4 +3 -3 XEmacs/packages/xemacs-packages/erc/erc-truncate.el
Index: erc-truncate.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-truncate.el,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- erc-truncate.el 2005/04/10 14:47:39 1.3
+++ erc-truncate.el 2005/10/15 18:15:30 1.4
@@ -16,9 +16,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
1.3 +3 -3 XEmacs/packages/xemacs-packages/erc/erc-viper.el
Index: erc-viper.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-viper.el,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- erc-viper.el 2005/06/05 15:47:03 1.2
+++ erc-viper.el 2005/10/15 18:15:30 1.3
@@ -16,9 +16,9 @@
;; General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the Free
-;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-;; 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
1.4 +3 -3 XEmacs/packages/xemacs-packages/erc/erc-xdcc.el
Index: erc-xdcc.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-xdcc.el,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- erc-xdcc.el 2005/04/10 14:47:40 1.3
+++ erc-xdcc.el 2005/10/15 18:15:30 1.4
@@ -16,9 +16,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+;; Boston, MA 02110-1301 USA
;;; Commentary:
1.12 +427 -1122 XEmacs/packages/xemacs-packages/erc/erc.el
Index: erc.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc.el,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- erc.el 2005/06/05 15:47:03 1.11
+++ erc.el 2005/10/15 18:15:30 1.12
@@ -2,10 +2,6 @@
;; Copyright (C) 1997,1998,1999,2000,2001,2002,2003,2004,2005
;; Free Software Foundation, Inc.
-;; Copyright (C) 2001 Tijs van Bakel
-;; Copyright (C) 2001,2002 Gergely Nagy
-;; Copyright (C) 2002,2003 Brian P Templeton
-;; Copyright (C) 2003 Arne Schwabe
;; Copyright (C) 2004 Jeremy Bertram Maitin-Shepard
;; Copyright (C) 2004 Brian Palmer
@@ -68,7 +64,7 @@
;;; Code:
-(defconst erc-version-string "Version 5.0 (CVS) $Revision: 1.757 $"
+(defconst erc-version-string "Version 5.0 (CVS) $Revision: 1.774 $"
"ERC version. This is used by function `erc-version'.")
(require 'cl)
@@ -76,7 +72,6 @@
(require 'pp)
(require 'thingatpt)
(require 'erc-compat)
-(require 'erc-backend)
(require 'erc-menu)
(defvar erc-official-location
@@ -93,10 +88,6 @@
"Creating new ERC buffers"
:group 'erc)
-(defgroup erc-coding-systems nil
- "Selecting coding systems for input and output"
- :group 'erc)
-
(defgroup erc-display nil
"Settings for how various things are displayed"
:group 'erc)
@@ -125,6 +116,29 @@
"Running scripts at startup and with /LOAD"
:group 'erc)
+(require 'erc-backend)
+
+;; compatibility with older ERC releases
+
+(if (fboundp 'defvaralias)
+ (progn
+ (defvaralias 'erc-announced-server-name 'erc-server-announced-name)
+ (make-obsolete-variable 'erc-announced-server-name
+ 'erc-server-announced-name
+ "ERC 5.1")
+ (defvaralias 'erc-process 'erc-server-process)
+ (make-obsolete-variable 'erc-process 'erc-server-process "ERC
5.1")
+ (defvaralias 'erc-default-coding-system 'erc-server-coding-system)
+ (make-obsolete-variable 'erc-default-coding-system
+ 'erc-server-coding-system
+ "ERC 5.1"))
+ (message (concat "ERC: You're using an old version of Emacs; "
+ "this might break backward-compatibility attempts "
+ "for old versions of ERC.")))
+
+(defalias 'erc-send-command 'erc-server-send)
+(make-obsolete 'erc-send-command 'erc-server-send "ERC 5.1")
+
;; tunable connection and authentication parameters
(defcustom erc-server nil
@@ -236,52 +250,10 @@ A typical value would be '(\"JOIN\" \"PA
:group 'erc-ignore
:type 'erc-message-type)
-(defvar erc-session-server nil
- "The server name used to connect to for this session.")
-(make-variable-buffer-local 'erc-session-server)
-
-(defvar erc-session-port nil
- "The port used to connect to.")
-(make-variable-buffer-local 'erc-session-port)
-
(defvar erc-session-password nil
"The password used for the current session.")
(make-variable-buffer-local 'erc-session-password)
-(defvar erc-announced-server-name nil
- "The name the server announced to use.")
-(make-variable-buffer-local 'erc-announced-server-name)
-
-(defvar erc-server-parameters nil
-
- "Alist listing the supported server parameters.
-
-This is only set if the server sends 005 messages saying what is
-supported on the server.
-
-Entries are of the form:
- (PARAMETER . VALUE)
-or
- (PARAMETER) if no value is provided.
-
-Some examples of possible parameters sent by servers:
-CHANMODES=b,k,l,imnpst - list of supported channel modes
-CHANNELLEN=50 - maximum length of channel names
-CHANTYPES=#&!+ - supported channel prefixes
-CHARMAPPING=rfc1459 - character mapping used for nickname and channels
-KICKLEN=160 - maximum allowed kick message length
-MAXBANS=30 - maximum number of bans per channel
-MAXCHANNELS=10 - maximum number of channels allowed to join
-NETWORK=EFnet - the network identifier
-NICKLEN=9 - maximum allowed length of nicknames
-PREFIX=(ov)@+ - list of channel modes and the user prefixes if user has mode
-RFC2812 - server supports RFC 2812 features
-SILENCE=10 - supports the SILENCE command, maximum allowed number of entries
-TOPICLEN=160 - maximum allowed topic length
-WALLCHOPS - supports sending messages to all operators in a channel")
-(make-variable-buffer-local 'erc-server-parameters)
-
-
(defcustom erc-disconnected-hook nil
"Run this hook with arguments (NICK IP REASON) when disconnected.
This happens before automatic reconnection. Note, that
@@ -344,16 +316,7 @@ Functions are run in the buffer-to-be."
:group 'erc-hooks
:type 'hook)
-(defvar erc-process nil
- "The process object of the corresponding server connection.")
-(make-variable-buffer-local 'erc-process)
-
-(defvar erc-connected nil
- "Non-nil if the `current-buffer' is associated with an open IRC connection.
-This variable is buffer-local.")
-(make-variable-buffer-local 'erc-connected)
-
(defvar erc-channel-users nil
"A hash table of members in the current channel, which
associates nicknames with cons cells of the form:
@@ -381,10 +344,8 @@ nicknames with erc-server-user struct in
s))
(defstruct (erc-server-user (:type vector) :named)
-
;; User data
nickname host login full-name info
-
;; Buffers
;;
;; This is an alist of the form (BUFFER . CHANNEL-DATA), where
@@ -393,9 +354,7 @@ nicknames with erc-server-user struct in
)
(defstruct (erc-channel-user (:type vector) :named)
-
op voice
-
;; Last message time (in the form of the return value of
;; (current-time)
;;
@@ -410,14 +369,14 @@ in the current buffer's `erc-channel-use
(defsubst erc-get-server-user (nick)
"Finds the USER corresponding to NICK in the current server's
`erc-server-users' hash table."
- (with-current-buffer (process-buffer erc-process)
+ (with-current-buffer (process-buffer erc-server-process)
(gethash (erc-downcase nick) erc-server-users)))
(defsubst erc-add-server-user (nick user)
"This function is for internal use only.
Adds USER with nickname NICK to the `erc-server-users' hash table."
- (with-current-buffer (process-buffer erc-process)
+ (with-current-buffer (process-buffer erc-server-process)
(puthash (erc-downcase nick) user erc-server-users)))
(defsubst erc-remove-server-user (nick)
@@ -428,7 +387,7 @@ hash table. This user is not removed fr
`erc-channel-users' lists of other buffers.
See also: `erc-remove-user'."
- (with-current-buffer (process-buffer erc-process)
+ (with-current-buffer (process-buffer erc-server-process)
(remhash (erc-downcase nick) erc-server-users)))
(defun erc-change-user-nickname (user new-nick)
@@ -439,7 +398,7 @@ Changes the nickname of USER to NEW-NICK
other buffers are also changed."
(let ((nick (erc-server-user-nickname user)))
(setf (erc-server-user-nickname user) new-nick)
- (with-current-buffer (process-buffer erc-process)
+ (with-current-buffer (process-buffer erc-server-process)
(remhash (erc-downcase nick) erc-server-users)
(puthash (erc-downcase new-nick) user erc-server-users))
(dolist (buf (erc-server-user-buffers user))
@@ -492,7 +451,7 @@ See also: `erc-remove-server-user' and
Removes all users in the current channel. This is called by
`erc-server-PART' and `erc-server-QUIT'."
- (when (and erc-connected
+ (when (and erc-server-connected
(erc-process-alive)
(hash-table-p erc-channel-users))
(maphash (lambda (nick cdata)
@@ -612,15 +571,15 @@ See also: `erc-get-channel-user-list'."
t)
nil))))))
-(defvar channel-topic nil
+(defvar erc-channel-topic nil
"A topic string for the channel. Should only be used in
channel-buffers.")
-(make-variable-buffer-local 'channel-topic)
+(make-variable-buffer-local 'erc-channel-topic)
-(defvar channel-modes nil
+(defvar erc-channel-modes nil
"List of strings representing channel modes.
E.g. '(\"i\" \"m\" \"s\" \"b Quake!*@*\")
\(not sure the ban list will be here, but why not)")
-(make-variable-buffer-local 'channel-modes)
+(make-variable-buffer-local 'erc-channel-modes)
(defvar erc-insert-marker nil
"The place where insertion of new text in erc buffers should happen.")
@@ -632,15 +591,6 @@ E.g. '(\"i\" \"m\" \"s\" \"b
Quake!*@*\"
(set-text-properties 0 (length newstring) nil newstring)
newstring))
-(if (not (fboundp 'propertize))
- (defun erc-propertize (string &rest props)
- (while props
- (put-text-property 0 (length string)
- (nth 0 props) (nth 1 props) string)
- (setq props (cddr props)))
- string)
- (defalias 'erc-propertize 'propertize))
-
(defcustom erc-prompt "ERC>"
"Prompt used by ERC. Trailing whitespace is not required."
:group 'erc-display
@@ -679,20 +629,6 @@ This only has any meaning if the variabl
(concat prompt " ")
prompt))))
-;; ; Hmm, is this useful at all. If so, we would need to do it better, because
-;; ; one looses nickname completion when turning this variable on.
-;; Removed -- Lawrence 2004-01-08
-;; (defcustom erc-prompt-interactive-input nil
-;; "*If non-nil, input can be typed in the minibuffer instead.
-;; This uses a local-map text-property to detect you started typing
-;; at the prompt, and copies the last key as initial input into the minibuffer.
-;; Obsolete as of 1.348."
-;; :group 'erc
-;; :type 'boolean)
-;; (make-obsolete-variable 'erc-prompt-interactive-input "Input in the
-;; minibuffer is deprecated now because it breaks some stuff,
-;; e.g. nick completion")
-
(defcustom erc-notice-prefix "*** "
"*Prefix for all notices."
:group 'erc-display
@@ -819,13 +755,6 @@ set if some hacker is trying to flood yo
:group 'erc-paranoia
:type 'boolean)
-(defcustom erc-auto-reconnect t
- "Non-nil means that ERC will attempt to reestablish broken connections.
-
-Reconnection will happen automatically for any unexpected disconnection."
- :group 'erc
- :type 'boolean)
-
(defcustom erc-prompt-for-channel-key nil
"Prompt for channel key when using `erc-join-channel' interactively"
:group 'erc
@@ -867,24 +796,8 @@ people. You can update the ERC internal
(defvar erc-flood-protect 'normal
"*If non-nil, flood protection is enabled.
Flooding is sending too much information to the server in too short time,
-which may result in loosing connection.
-
-If the value is 'strict, use a more strict limits provided in
-`erc-flood-limit2', otherwise use \"normal\" limits from
`erc-flood-limit'.")
+which may result in loosing connection.")
-(defvar erc-flood-limit '(1000 25 5)
- "Is a 3-element list (BYTES LINES SEC), defining the flood threshold:
-at most BYTES bytes or LINES lines in messages within SEC seconds from
-each other. When either byte or line limit is exceeded, ERC stops
-sending anything to the server, except for pings and one-line manual
-user's commands.")
-
-(defvar erc-flood-limit2 '(300 10 5)
- "Similar to `erc-flood-protect', but normally much more strict.
-It will be used instead of `erc-flood-protect' in critical situations
-\(detected flood, explicit user request, etc.). Currently, it is
-turned on when the flood limit is exceeded for the first time.")
-
;; Script parameters
(defcustom erc-startup-file-list
@@ -1161,6 +1074,14 @@ which the local user typed."
(define-key map "\C-c\C-u" 'erc-kill-input)
(define-key map "\M-\t" 'ispell-complete-word)
(define-key map "\t" 'erc-complete-word)
+
+ ;; Suppress `font-lock-fontify-block' key binding since it
+ ;; destroys face properties.
+ (if (fboundp 'command-remapping)
+ (define-key map [remap font-lock-fontify-block] 'undefined)
+ (substitute-key-definition
+ 'font-lock-fontify-block 'undefined map global-map))
+
map)
"ERC keymap.")
@@ -1344,14 +1265,16 @@ connection over which the data was recei
(defun erc-server-buffer ()
"Return the server buffer for the current buffer's process.
-The buffer-local variable `erc-process' is used to find the process buffer."
+The buffer-local variable `erc-server-process' is used to find
+the process buffer."
(and (erc-server-buffer-live-p)
- (process-buffer erc-process)))
+ (process-buffer erc-server-process)))
(defun erc-server-buffer-live-p ()
- "Return t if the buffer associated with `erc-process' has not been
killed."
- (and (processp erc-process)
- (buffer-live-p (process-buffer erc-process))))
+ "Return t if the buffer associated with `erc-server-process'
+has not been killed."
+ (and (processp erc-server-process)
+ (buffer-live-p (process-buffer erc-server-process))))
(defun erc-server-buffer-p (&optional buffer)
"Return non-nil if argument BUFFER is an ERC server buffer.
@@ -1380,7 +1303,7 @@ If BUFFER is nil, the current buffer is
`(let ((ison (split-string (aref parsed 3))))
(setq erc-online-p (car (erc-member-ignore-case ,nick ison)))
t))
- (erc-send-command (format "ISON %s" nick))
+ (erc-server-send (format "ISON %s" nick))
(while (eq erc-online-p 'unknown) (accept-process-output))
(if (interactive-p)
(message "%s is %sonline"
@@ -1447,27 +1370,13 @@ Turning on `erc-mode' runs the hook `erc
major-mode 'erc-mode
local-abbrev-table erc-mode-abbrev-table)
(set-syntax-table erc-mode-syntax-table)
- ;; This seems to work only in CVS emacs. "GNU Emacs 21.2.2" has
- ;; problems with this:
- ;; (string-match "[^ ]" "foo bar") returns nil.
- ;; And XEmacs doesn't have set-case-syntax-pair :(...
-;; (when (and (>= emacs-major-version 21)
-;; (>= emacs-minor-version 3))
-;; (set-case-table
-;; (let ((table (copy-case-table (standard-case-table))))
-;; (set-case-syntax-pair ?\[ ?\{ table)
-;; (set-case-syntax-pair ?\] ?\} table)
-;; (set-case-syntax-pair ?\\ ?\| table)
-;; (set-case-syntax-pair ?~ ?^ table)
-;; table)))
(when (boundp 'next-line-add-newlines)
(set (make-local-variable 'next-line-add-newlines) nil))
- (make-variable-buffer-local 'paragraph-separate)
- (make-variable-buffer-local 'paragraph-start)
(setq line-move-ignore-invisible t)
- (setq paragraph-separate (concat "\C-l\\|\\(^" (regexp-quote (erc-prompt))
- "\\)"))
- (setq paragraph-start (concat "\\(" (regexp-quote (erc-prompt))
"\\)"))
+ (set (make-local-variable 'paragraph-separate)
+ (concat "\C-l\\|\\(^" (regexp-quote (erc-prompt)) "\\)"))
+ (set (make-local-variable 'paragraph-start)
+ (concat "\\(" (regexp-quote (erc-prompt)) "\\)"))
;; Run the mode hooks
(run-hooks 'erc-mode-hook))
@@ -1577,7 +1486,7 @@ symbol, it may have these values:
(or target
(with-current-buffer (get-buffer buf-name)
(and (erc-server-buffer-p)
- (not erc-connected))))
+ (not erc-server-connected))))
(with-current-buffer (get-buffer buf-name)
(and (string= erc-session-server server)
(erc-port-equal erc-session-port port))))
@@ -1609,7 +1518,7 @@ SPEC should have the form
If TARGET is a buffer, use this one. Otherwise, use the buffer
matching TARGET in the process specified by PROCESS or, if PROCESS is
-nil, the current `erc-process' (see `erc-get-buffer').
+nil, the current `erc-server-process' (see `erc-get-buffer').
See also `with-current-buffer'.
@@ -1623,8 +1532,8 @@ See also `with-current-buffer'.
(,buf (if (bufferp ,target)
,target
(let ((,proc (or ,process
- (and (processp erc-process)
- erc-process))))
+ (and (processp erc-server-process)
+ erc-server-process))))
(if (and ,target ,proc)
(erc-get-buffer ,target ,proc))))))
(when ,buf
@@ -1650,8 +1559,9 @@ If PROC is not supplied, all processes a
"Return a list of `erc-mode' buffers matching certain criteria.
PREDICATE is a function executed with each buffer, if it returns t, that buffer
is considered a valid match.
-PROC is either an `erc-process', identifying a certain server connection,
-or nil which means all open connections."
+
+PROC is either an `erc-server-process', identifying a certain
+server connection, or nil which means all open connections."
(save-excursion
(delq
nil
@@ -1659,7 +1569,7 @@ or nil which means all open connections.
(with-current-buffer buf
(and (eq major-mode 'erc-mode)
(or (not proc)
- (eq proc erc-process))
+ (eq proc erc-server-process))
(funcall predicate)
buf)))
(buffer-list)))))
@@ -1668,7 +1578,7 @@ or nil which means all open connections.
"Return a list of ERC buffers.
PREDICATE is a function which executes with every buffer satisfying
the predicate. If PREDICATE is passed as nil, return a list of all ERC
-buffers. If PROC is given, the buffers local variable `erc-process'
+buffers. If PROC is given, the buffers local variable `erc-server-process'
needs to match PROC."
(unless predicate
(setq predicate (lambda () t)))
@@ -1709,8 +1619,8 @@ needs to be active for this function to
(mapcar 'buffer-name
(erc-buffer-list
nil
- (when (and arg (boundp 'erc-process))
- erc-process)))))))
+ (when (and arg (boundp 'erc-server-process))
+ erc-server-process)))))))
(switch-to-buffer
(iswitchb-read-buffer
"Switch-to: "
@@ -1734,7 +1644,6 @@ all channel buffers on all servers."
(if user
(erc-server-user-buffers user)
nil))))
-
;; Some local variables
@@ -1746,66 +1655,29 @@ all channel buffers on all servers."
"Full name of the user on the current server.")
(make-variable-buffer-local 'erc-session-user-full-name)
-(defvar current-nick nil
- "Nickname on the current server.
-Use `erc-current-nick' to access this.")
-(make-variable-buffer-local 'current-nick)
-
-(defvar channel-user-limit nil
+(defvar erc-channel-user-limit nil
"Limit of users per channel.")
-(make-variable-buffer-local 'channel-user-limit)
+(make-variable-buffer-local 'erc-channel-user-limit)
-(defvar channel-key nil
+(defvar erc-channel-key nil
"Key needed to join channel.")
-(make-variable-buffer-local 'channel-key)
-
-(defvar last-peers '(nil . nil)
- "Last peers used, both sender and receiver.
-Those are used for /MSG destination shortcuts.")
-(make-variable-buffer-local 'last-peers)
+(make-variable-buffer-local 'erc-channel-key)
-(defvar invitation nil
+(defvar erc-invitation nil
"Last invitation channel.")
-(make-variable-buffer-local 'invitation)
+(make-variable-buffer-local 'erc-invitation)
-(defvar away nil
+(defvar erc-away nil
"Non-nil indicates that we are away.")
-(make-variable-buffer-local 'away)
+(make-variable-buffer-local 'erc-away)
-(defvar channel-list nil
+(defvar erc-channel-list nil
"Server channel list.")
-(make-variable-buffer-local 'channel-list)
-
-(defvar last-sent-time nil
- "Time the message was sent.
-This is useful for flood protection.")
-(make-variable-buffer-local 'last-sent-time)
-
-(defvar last-ping-time nil
- "Time the last ping was sent.
-This is useful for flood protection.")
-(make-variable-buffer-local 'last-ping-time)
-
-(defvar last-ctcp-time nil
- "Time the last CTCP response/request was sent.
-This is useful for flood protection.")
-(make-variable-buffer-local 'last-ctcp-time)
-
-(defvar erc-lines-sent nil
- "Line counter.")
-(make-variable-buffer-local 'erc-lines-sent)
-
-(defvar erc-bytes-sent nil
- "Byte counter.")
-(make-variable-buffer-local 'erc-bytes-sent)
-
-(defvar quitting nil
- "Non-nil if the user requests a quit.")
-(make-variable-buffer-local 'quitting)
+(make-variable-buffer-local 'erc-channel-list)
-(defvar bad-nick nil
+(defvar erc-bad-nick nil
"Non-nil indicates that we got a `nick in use' error while
connecting.")
-(make-variable-buffer-local 'bad-nick)
+(make-variable-buffer-local 'erc-bad-nick)
(defvar erc-logged-in nil
"Non-nil indicates that we are logged in.")
@@ -1831,7 +1703,7 @@ removed from the list will be disabled."
(dolist (module erc-modules)
(unless (member module val)
(let ((f (intern-soft (format "erc-%s-mode" module))))
- (when (fboundp f)
+ (when (and (fboundp f) (boundp f) (symbol-value f))
(message "Disabling `erc-%s'" module)
(funcall f 0))))))
(set-default sym val)
@@ -1924,44 +1796,41 @@ removed from the list will be disabled."
(display-buffer buffer)
(switch-to-buffer buffer)))))
-(defvar erc-previous-read ""
- "Variable used to cache partially received lines.")
-(make-variable-buffer-local 'erc-previous-read)
-
(defun erc (&optional server port nick full-name
connect passwd tgt-list channel process)
"Run the Emacs Internet Relay Chat Client.
+
+Connect to SERVER on PORT as NICK with FULL-NAME.
-Connect to SERVER on PORT as NICK with FULL-NAME If CONNECT is
-non-nil, connect to the server. Otherwise assume already
-connected and just create a separate buffer for the new target
-CHANNEL. Use PASSWD as user password on the server. If TGT-LIST
-is non-nil, use it to initialise `erc-default-recipients'.
+If CONNECT is non-nil, connect to the server. Otherwise assume
+already connected and just create a separate buffer for the new
+target CHANNEL.
+Use PASSWD as user password on the server. If TGT-LIST is
+non-nil, use it to initialise `erc-default-recipients'.
+
Returns the buffer for the given server or channel."
- (let ((announced-server-name (when (and (boundp 'erc-session-server)
- (string= server erc-session-server)
- (boundp 'erc-announced-server-name))
- erc-announced-server-name))
- (connected-p (unless connect erc-connected))
+ (let ((server-announced-name (when (and (boundp 'erc-session-server)
+ (string= server erc-session-server))
+ erc-server-announced-name))
+ (connected-p (unless connect erc-server-connected))
(buffer (erc-get-buffer-create server port channel))
(old-buffer (current-buffer)))
(set-buffer buffer)
(erc-mode)
- (setq erc-announced-server-name announced-server-name)
- (setq erc-connected connected-p)
+ (setq erc-server-announced-name server-announced-name)
+ (setq erc-server-connected connected-p)
;; go to the end of the buffer and open a new line
;; (the buffer may have existed)
(goto-char (point-max))
(insert "\n")
;; connection parameters
- (setq erc-process process)
+ (setq erc-server-process process)
(setq erc-insert-marker (make-marker))
(set-marker erc-insert-marker (point))
;; stack of default recipients
(setq erc-default-recipients tgt-list)
- ;; stack for user's nicknames
- (setq current-nick nil)
+ (setq erc-server-current-nick nil)
;; Initialize erc-server-users and erc-channel-users
(if connect
(progn ;; server buffer
@@ -1973,35 +1842,23 @@ Returns the buffer for the given server
(setq erc-channel-users
(make-hash-table :test 'equal))))
;; clear last incomplete line read
- (setq erc-previous-read "")
- (setq channel-topic "")
+ (setq erc-server-filter-data nil)
+ (setq erc-channel-topic "")
;; limit on the number of users on the channel (mode +l)
- (setq channel-user-limit nil)
- (setq channel-key nil)
+ (setq erc-channel-user-limit nil)
+ (setq erc-channel-key nil)
;; last active buffer, defaults to this one
(erc-set-active-buffer buffer)
- ;; last peers (sender and receiver)
- (setq last-peers '(nil . nil))
;; last invitation channel
- (setq invitation nil)
+ (setq erc-invitation nil)
;; away flag
;; Should only be used in session-buffers
- (setq away (let ((serverbuf (erc-server-buffer)))
- (and serverbuf (with-current-buffer serverbuf away))))
+ (setq erc-away (let ((serverbuf (erc-server-buffer)))
+ (and serverbuf (with-current-buffer serverbuf erc-away))))
;; Server channel list
- (setq channel-list ())
-;;;; Some flood protection stuff
- ;; time of last command sent
- ;; time of last CTCP response/request sent
- (setq last-sent-time (erc-current-time))
- (setq last-ping-time (erc-current-time))
- (setq last-ctcp-time (erc-current-time))
- (setq erc-lines-sent 0)
- (setq erc-bytes-sent 0)
- ;; user requested quit
- (setq quitting nil)
+ (setq erc-channel-list ())
;; login-time 'nick in use' error
- (setq bad-nick nil)
+ (setq erc-bad-nick nil)
;; whether we have logged in
(setq erc-logged-in nil)
;; The local copy of `erc-nick' - the list of nicks to choose
@@ -2018,11 +1875,12 @@ Returns the buffer for the given server
(run-hooks 'erc-connect-pre-hook)
(when connect
- (erc-connect))
+ (erc-server-connect erc-session-server erc-session-port))
(erc-update-mode-line)
+ (set-marker erc-insert-marker (point))
(goto-char (point-max))
(insert "\n")
- (set-marker (process-mark erc-process) (point))
+ (set-marker (process-mark erc-server-process) (point))
(set-marker erc-insert-marker (point))
(erc-display-prompt)
(goto-char (point-max))
@@ -2087,19 +1945,22 @@ functions in here get called with the pa
(defun erc-select-read-args ()
"Prompt the user for values of nick, server, port, and password."
(let (user-input server port nick passwd)
- (setq user-input (read-from-minibuffer
- "IRC server: "
+ (setq user-input (read-from-minibuffer
+ "IRC server: "
(erc-compute-server) nil nil 'erc-server-history-list))
(if (string-match "\\(.*\\):\\(.*\\)\\'" user-input)
(setq port (erc-string-to-port (match-string 2 user-input))
user-input (match-string 1 user-input))
- (setq port (erc-string-to-port (read-from-minibuffer "IRC port: "
(erc-port-to-string (erc-compute-port))))))
-
+ (setq port
+ (erc-string-to-port (read-from-minibuffer
+ "IRC port: " (erc-port-to-string
+ (erc-compute-port))))))
+
(if (string-match "\\`\\(.*\\)(a)\\(.*\\)" user-input)
(setq nick (match-string 1 user-input)
user-input (match-string 2 user-input))
- (setq nick
+ (setq nick
(if (erc-already-logged-in server port nick)
(read-from-minibuffer
(erc-format-message 'nick-in-use ?n nick)
@@ -2110,7 +1971,7 @@ functions in here get called with the pa
nil nil 'erc-nick-history-list))))
(setq server user-input)
-
+
(setq passwd (if erc-prompt-for-password
(if (and erc-password
(y-or-n-p "Use the default password? "))
@@ -2136,14 +1997,14 @@ functions in here get called with the pa
(defun* erc-select (&key (server (erc-compute-server))
(port (erc-compute-port))
(nick (erc-compute-nick))
- password
+ password
(full-name (erc-compute-full-name)))
- "Select connection parameters and run ERC.
-Non-interactively, it takes keyword arguments
+ "Select connection parameters and run ERC.
+Non-interactively, it takes keyword arguments
(server (erc-compute-server))
(port (erc-compute-port))
(nick (erc-compute-nick))
- password
+ password
(full-name (erc-compute-full-name)))
That is, if called with
@@ -2158,10 +2019,10 @@ be invoked for those parameters' values"
(defun erc-select-ssl (&rest r)
- "Interactively select SSL connection parameters and run ERC.
+ "Interactively select SSL connection parameters and run ERC.
Arguments are as to erc-select."
(interactive (erc-select-read-args))
- (let ((erc-connect-function 'erc-open-ssl-stream))
+ (let ((erc-server-connect-function 'erc-open-ssl-stream))
(apply 'erc-select r)))
(defun erc-open-ssl-stream (name buffer host port)
@@ -2176,73 +2037,9 @@ BUFFER. HOST and PORT specify the conne
;; most IRC servers send nothing and wait for you to identify.
(sit-for 5)
proc)))
-
-;;; process management
-(defcustom erc-connect-function
- (if (and (fboundp 'open-network-stream-nowait)
- ;; CVS Emacs claims to define open-network-stream-nowait on
- ;; windows, however, it does, in fact, not work.
- (not (memq system-type '(windows-nt cygwin ms-dos darwin))))
- 'open-network-stream-nowait
- 'open-network-stream)
- "Function used to initiate a connection.
-It should take same arguments as `open-network-stream' does."
- :group 'erc
- :type 'function)
-
-(defun erc-connect ()
- "Perform the connection and login."
- (let ((msg (erc-format-message 'connect
- ?S erc-session-server
- ?p erc-session-port)))
- (message "%s" msg)
- (setq erc-process
- (funcall erc-connect-function
- (format "erc-%s-%s" erc-session-server erc-session-port)
- (current-buffer)
- erc-session-server
- erc-session-port))
- (message "%s...done" msg))
- (set-process-sentinel erc-process 'erc-process-sentinel)
- (set-process-filter erc-process 'erc-process-filter)
- ;; we do our own encoding and decoding
- (when (fboundp 'set-process-coding-system)
- (set-process-coding-system erc-process 'raw-text 'raw-text))
- (set-marker (process-mark erc-process) (point))
- (set-marker erc-insert-marker (point))
- (erc-log "\n\n\n********************************************\n")
- (message (erc-format-message 'login ?n (erc-current-nick)))
- ;; wait with script loading until we receive a confirmation (first
- ;; MOTD line)
- (if (eq erc-connect-function 'open-network-stream-nowait)
- ;; it's a bit unclear otherwise that it's attempting to establish a
- ;; connection
- (erc-display-message nil nil (current-buffer)
- "Opening connection..\n")
- (erc-login)))
+;;; Debugging the protocol
-(defun erc-split-multiline (string)
- "Split STRING, containing multiple lines and return them in a list.
-This function is closely tied in to `erc-process-filter'.
-It uses a buffer local variable called `erc-previous-read' to handle partial
-strings."
- (let ((i0 0)
- (doit t) l)
- (while doit
- (let ((i (string-match "\r?\n" string i0))
- (s (substring string i0)))
- (cond (i
- (setq l (cons (concat erc-previous-read (substring string i0 i))
- l))
- (setq erc-previous-read "")
- (setq i0 (match-end 0)))
- ((> (length s) 0)
- (setq erc-previous-read (concat erc-previous-read s))
- (setq doit nil))
- (t (setq doit nil)))))
- (nreverse l)))
-
(defvar erc-debug-irc-protocol nil
"If non-nil, log all IRC protocol traffic to the buffer
\"*erc-protocol*\".
@@ -2268,15 +2065,18 @@ and appears in erc-input-face in the buf
(let ((network-name (or (ignore-errors (erc-network-name))
"???")))
(with-current-buffer (get-buffer-create "*erc-protocol*")
- (save-excursion
+ (save-excursion
(goto-char (point-max))
(let ((inhibit-read-only t))
(insert (if (not outbound)
- ;; Cope with the fact that string might contain multiple lines of text.
- (let ((lines (delete "" (split-string string "\n\\|\r\n")))
+ ;; Cope with the fact that string might
+ ;; contain multiple lines of text.
+ (let ((lines (delete "" (split-string string
+ "\n\\|\r\n")))
(result ""))
(dolist (line lines)
- (setq result (concat result network-name " << " line
"\n")))
+ (setq result (concat result network-name
+ " << " line "\n")))
result)
(erc-propertize
(concat network-name " >> " string
@@ -2301,7 +2101,7 @@ If ARG is non-nil, show the *erc-protoco
(interactive "P")
(let* ((buf (get-buffer-create "*erc-protocol*")))
(with-current-buffer buf
- (view-mode 1)
+ (erc-view-mode-enter 1)
(when (null (current-local-map))
(let ((inhibit-read-only t))
(insert (erc-make-notice "This buffer displays all IRC protocol traffic
exchanged with each server.\n"))
@@ -2324,313 +2124,10 @@ If ARG is non-nil, show the *erc-protoco
(message "IRC protocol traffic logging %s (see buffer *erc-protocol*)."
(if erc-debug-irc-protocol "enabled" "disabled"))))
-(defun erc-process-filter (proc string)
- "Filter function for incoming server traffic.
-PROC is the process where input came from and
-STRING is the string received."
- (with-current-buffer (process-buffer proc)
- (erc-log-irc-protocol string)
- (mapc (lambda (line)
- (erc-parse-server-response proc line))
- (erc-split-multiline string))))
-
-(defun erc-process-sentinel-1 (event)
- "This will be called when erc-process-sentinel has decided that we
-are going to quit. Determine whether user has quit or whether erc has
-been terminated. Conditionally try to reconnect and take appropriate
-action."
- (if quitting
- ;; normal quit
- (progn
- (let ((string "\n\n*** ERC finished ***\n")
- (inhibit-read-only t))
- (erc-put-text-property 0 (length string)
- 'face 'erc-error-face string)
- (insert string))
- (when erc-kill-server-buffer-on-quit
- (set-buffer-modified-p nil)
- (kill-buffer (current-buffer))))
- ;; unexpected disconnect
- (erc-display-message nil 'error (current-buffer)
- (if erc-auto-reconnect
- 'disconnected
- 'disconnected-noreconnect))
- (erc-update-mode-line)
- (erc-set-active-buffer (current-buffer))
- (setq last-sent-time 0)
- (setq erc-lines-sent 0)
- (if (and erc-auto-reconnect
- (not (string= event "deleted\n"))
- ;; open-network-stream-nowait error for connection refused
- (not (string= event "failed with code 111\n")))
- (erc erc-session-server erc-session-port current-nick
- erc-session-user-full-name t erc-session-password)
- ;; terminate, do not reconnect
- (let ((string (concat "\n\n*** ERC terminated: " event
- "\n"))
- (inhibit-read-only t))
- (erc-put-text-property 0 (length string)
- 'face 'erc-error-face string)
- (insert string)))))
-
-(defun erc-process-sentinel (cproc event)
- "Sentinel function for ERC process."
- (with-current-buffer (process-buffer cproc)
- (erc-log (format
- "SENTINEL: proc: %S status: %S event: %S (quitting: %S)"
- cproc (process-status cproc) event quitting))
- (if (equal event "open\n")
- ;; newly opened connection (no wait)
- (erc-login)
- ;; assume event is 'failed
- (let ((buf (process-buffer cproc)))
- (erc-with-all-buffers-of-server cproc nil (setq erc-connected nil))
- (when erc-ping-handler
- (progn (erc-cancel-timer erc-ping-handler)
- (setq erc-ping-handler nil)))
- (run-hook-with-args 'erc-disconnected-hook
- (erc-current-nick) (system-name) "")
- ;; Remove the prompt
- (forward-line 0)
- (erc-remove-text-properties-region (point) (point-max))
- (delete-region (point) (point-max))
- ;; Decide what to do with the buffer
- ;; Restart if disconnected
- (erc-process-sentinel-1 event)
- ;; Make sure we don't write to the buffer if it has been
- ;; killed
- (when (buffer-live-p buf)
- (erc-update-mode-line)
- (set-buffer-modified-p nil))))))
-
-
;;; I/O interface
;; send interface
-(defun erc-flood-exceeded-p (line)
- "Determines whether the flood limits are exceeded or not by the LINE.
-It also maintains all the flood control variables."
- ;; First, clean up if no messages for long enough time
- (let ((flood (cond ((eq erc-flood-protect 'strict) erc-flood-limit2)
- (erc-flood-protect erc-flood-limit)
- (t nil))))
- (when (or (not flood)
- (< (+ last-sent-time (nth 2 flood)) (erc-current-time)))
- (setq erc-lines-sent 0
- erc-bytes-sent 0))
- ;; Update the variables for the new line
- (setq erc-lines-sent (1+ erc-lines-sent)
- erc-bytes-sent (+ (length line) erc-bytes-sent)
- last-sent-time (erc-current-time))
- ;; Now do what they ask
- (and flood
- (let ((bytes (nth 0 flood))
- (lines (nth 1 flood)))
- (or (and lines (> erc-lines-sent lines))
- (and bytes (> erc-bytes-sent bytes)))))))
-
-(defun erc-send-command (l &optional force target)
- "Send command line L to IRC server.
-If the optional FORCE is non-nil, send the command even if the
-flood guard is in effect and the limit is exceeded.
-
-Usually this function is called in a server buffer, so
-`erc-default-target' will return nil. In cases where encoding
-and decoding of arguments is important, pass the current TARGET
-along, so that we can pass it on to
-`erc-encode-string-for-target'.
-
-Return non-nil if the line is actually sent, nil otherwise.
-The command line must contain neither prefix nor trailing `\\n'"
- (erc-log (concat "erc-send-command: " l "(" (buffer-name)
")"))
- (let ((ob (current-buffer))
- (buf (erc-server-buffer))
- (res t)
- commands exceeded)
- (if buf
- (with-current-buffer buf
- ;; maybe split the command up into multiple commands, so as to avoid
- ;; exceeding length restrictions
- (mapc
- (lambda (l)
- (setq exceeded (erc-flood-exceeded-p l))
- (if (or force (not exceeded))
- (progn
- (when exceeded
- (message "Warning: flood exceeded, but send forced")
- (erc-log-aux
- (format (concat "ERC FLOOD PROTECT: flood exceeded,"
- " but send forced on %S\n")
- l)))
- (erc-log-irc-protocol l 'outbound)
- (process-send-string
- erc-process
- (concat (erc-encode-string-for-target l target) "\n")))
- (unless erc-disable-ctcp-replies
- (setq erc-disable-ctcp-replies t)
- (erc-display-message nil 'error ob 'flood-ctcp-off))
- (unless (eq erc-flood-protect 'strict)
- (setq erc-flood-protect 'strict)
- (erc-display-message nil 'error ob 'flood-strict-mode))
- (message "ERC FLOOD PROTECT: line not sent: %S" l)
- (erc-log-aux (format "ERC FLOOD PROTECT: line not sent: %S"
- l))))
- (erc-split-command l)))
- (message "ERC: No process running")
- (beep))
- res))
-
-(defcustom erc-default-coding-system (if (and (fboundp 'coding-system-p)
- (coding-system-p 'undecided)
- (coding-system-p 'utf-8))
- '(utf-8 . undecided)
- nil)
- "The default coding system for incoming and outgoing text.
-This is either a coding system, a cons, or a function.
-
-If a cons, the encoding system for outgoing text is in the car
-and the decoding system for incoming text is in the cdr. The
-most interesting use for this is to put `undecided' in the cdr.
-If a function, it is called with no should return a coding system
-or a cons as described above. Note that you can use the
-dynamically bound variable `target' to get the current target.
-See `erc-coding-system-for-target'.
-
-If you need to send non-ASCII text to people not using a client that
-does decoding on its own, you must tell ERC what encoding to use.
-Emacs cannot guess it, since it does not know what the people on the
-other end of the line are using."
- :group 'erc-coding-systems
- :type '(choice (const :tag "None" nil)
- coding-system
- (cons (coding-system :tag "encoding" :value utf-8)
- (coding-system :tag "decoding" :value undecided))
- function))
-
-(defcustom erc-encoding-coding-alist nil
- "Alist of target regexp and coding-system pairs to use.
-This overrides `erc-default-coding-system' depending on the current target
-as returned by `erc-default-target'.
-
-Example: If you know that the channel #linux-ru uses the coding-system
-`cyrillic-koi8', then add '(\"#linux-ru\" . cyrillic-koi8) to the
-alist."
- :group 'erc-coding-systems
- :type '(repeat (cons (string :tag "Target")
- coding-system)))
-
-(defun erc-coding-system-for-target (target)
- "Return the coding system or cons cell appropriate for TARGET.
-This is determined via `erc-encoding-coding-alist' or
-`erc-default-coding-system'."
- (or (cdr (assoc target erc-encoding-coding-alist))
- (and (functionp erc-default-coding-system)
- (funcall erc-default-coding-system))
- erc-default-coding-system))
-
-(defun erc-encode-string-for-target (str target)
- "Encode STR as appropriate for TARGET.
-This is indicated by `erc-encoding-coding-alist', defaulting to the value of
-`erc-default-coding-system'."
- (let ((coding (erc-coding-system-for-target target)))
- (when (consp coding)
- (setq coding (car coding)))
- (erc-encode-coding-string str coding)))
-
-(defun erc-decode-string-from-target (str target)
- "Decode STR as appropriate for TARGET.
-This is indicated by `erc-encoding-coding-alist', defaulting to the value of
-`erc-default-coding-system'."
- (let ((coding (erc-coding-system-for-target target)))
- (when (consp coding)
- (setq coding (cdr coding)))
- (erc-decode-coding-string str coding)))
-
-(defun erc-split-command (line)
- "Split LINE into manageable chunks.
-
-LINE is split so that no single command is longer than 510 bytes (the max
-length of a command according to the the IRC RFC).
-
-LINE is returned as a list of strings.
-
-Signals an error if the line is too long and it doesn't make
-sense to split it."
- (let ((splittable "^\\(PRIVMSG\\|NOTICE\\)")
- ;; IRC RFC says max 510 for the whole command, which means
- ;; :nick!user@host COMMAND args :arg
- ;; FIXME: We ought to calculate the length of :nick!user@host --
- ;; Lawrence 2004-01-08
- ;; So we're forced to go with a conservative estimate
- (maxlen 450)
- preamble lines div curline ctcpp)
- (if (> (length line) maxlen)
- (if (string-match splittable line)
- (progn
- ;; extract the command info
- (setq div (1+ (string-match ":" line)))
- (setq preamble (substring line 0 div))
- (setq line (substring line div (length line)))
- (when (string-match "^\\(\C-a[A-Z]* \\)\\(.*\\)\C-a" line)
- (setq preamble (concat preamble
- (match-string 1 line)))
- (setq line (match-string 2 line))
- (setq ctcpp t))
- (setq div (- maxlen (length preamble) 1))
- (while line
- ;; a splitting algorithm that favoured not breaking words
- ;; would be preferable here
- (setq div (min div (length line)))
- (setq curline (substring line 0 div))
- (if (= div (length line))
- (setq line nil)
- (setq line (substring line div (length line))))
- (add-to-list 'lines (concat preamble
- curline
- (if ctcpp
- "\C-a"
- ""))
- t)))
- (error "Oversized non-splittable command: %s" line))
- ;; if the line was smaller, return it as a list
- (setq lines (list line)))
- lines))
-
-(defun erc-upcase-first-word (str)
- "Upcase the first word in STR."
- (with-temp-buffer
- (insert str)
- (goto-char (point-min))
- (upcase-word 1)
- (buffer-string)))
-
-(defun erc-send-ctcp-message (tgt l &optional force)
- "Send CTCP message L to TGT.
-
-If TGT is nil the message is not sent.
-The command must contain neither a prefix nor a trailing `\\n'.
-
-See also `erc-send-command'."
- (let ((l (erc-upcase-first-word l)))
- (cond
- (tgt
- (erc-log (format "erc-send-CTCP-message: [%s] %s" tgt l))
- (erc-send-command (format "PRIVMSG %s :\C-a%s\C-a" tgt l) force)))))
-
-(defun erc-send-ctcp-notice (tgt l &optional force)
- "Send CTCP notice L to TGT.
-
-If TGT is nil the message is not sent.
-The command must contain neither a prefix nor a trailing `\\n'.
-
-See also `erc-send-command'."
- (let ((l (erc-upcase-first-word l)))
- (cond
- (tgt
- (erc-log (format "erc-send-CTCP-notice: [%s] %s" tgt l))
- (erc-send-command (format "NOTICE %s :\C-a%s\C-a" tgt l) force)))))
-
(defun erc-send-action (tgt str &optional force)
"Send CTCP ACTION information described by STR to TGT."
(erc-send-ctcp-message tgt (format "ACTION %s" str) force)
@@ -2654,7 +2151,7 @@ Afterwards, `erc-insert-modify' and `erc
If STRING is nil, the function does nothing."
(when string
(save-excursion
- (set-buffer (or buffer (process-buffer erc-process)))
+ (set-buffer (or buffer (process-buffer erc-server-process)))
(let ((insert-position (or (marker-position erc-insert-marker)
(point-max))))
(let ((string string) ;; FIXME! Can this be removed?
@@ -2685,10 +2182,10 @@ If STRING is nil, the function does noth
(save-restriction
(narrow-to-region insert-position (point))
(run-hooks 'erc-insert-modify-hook)
- (run-hooks 'erc-insert-post-hook)))))
- (erc-update-undo-list (- (or (marker-position erc-insert-marker)
- (point-max))
- insert-position)))))))
+ (run-hooks 'erc-insert-post-hook))))))
+ (erc-update-undo-list (- (or (marker-position erc-insert-marker)
+ (point-max))
+ insert-position))))))
(defun erc-update-undo-list (shift)
;; Translate buffer positions in buffer-undo-list by SHIFT.
@@ -2707,7 +2204,7 @@ If STRING is nil, the function does noth
(incf (cdr elt) shift))
((stringp (car elt)) ; (TEXT . POSITION)
(incf (cdr elt) (* (if (natnump (cdr elt)) 1 -1) shift)))
- ((null (car elt)) ; (nil PROPERTY VALUE BEG . END)
+ ((null (car elt)) ; (nil PROPERTY VALUE BEG . END)
(let ((cons (nthcdr 3 elt)))
(incf (car cons) shift)
(incf (cdr cons) shift)))
@@ -2742,20 +2239,20 @@ If STRING is nil, the function does noth
((listp buffer) buffer)
((processp buffer) (list (process-buffer buffer)))
((eq 'all buffer)
- (and (boundp 'erc-process)
+ (and (boundp 'erc-server-process)
;; Hmm, or all of the same session server?
- (erc-buffer-list nil erc-process)))
+ (erc-buffer-list nil erc-server-process)))
((and (eq 'active buffer) (erc-active-buffer))
(list (erc-active-buffer)))
((erc-server-buffer-live-p)
- (list (process-buffer erc-process)))
+ (list (process-buffer erc-server-process)))
(t (list (current-buffer)))))
(when (buffer-live-p buf)
(erc-display-line-1 string buf)
(add-to-list 'new-bufs buf)))
(when (null new-bufs)
(if (erc-server-buffer-live-p)
- (erc-display-line-1 string (process-buffer erc-process))
+ (erc-display-line-1 string (process-buffer erc-server-process))
(erc-display-line-1 string (current-buffer))))))
(defun erc-display-message-highlight (type string)
@@ -2814,16 +2311,15 @@ present."
(defun erc-send-input-line (target line &optional force)
"Send LINE to TARGET.
-See also `erc-send-command'."
- (erc-send-command (format "PRIVMSG %s :%s"
- target
- ;; If the line is empty, we still want to
- ;; send it - i.e. an empty pasted line.
- (if (string= line "\n")
- " \n"
- line))
- force
- target))
+See also `erc-server-send'."
+ (setq line (format "PRIVMSG %s :%s"
+ target
+ ;; If the line is empty, we still want to
+ ;; send it - i.e. an empty pasted line.
+ (if (string= line "\n")
+ " \n"
+ line)))
+ (erc-server-send line force target))
;; if we're in emacs21 CVS, we use help-function-arglist which is more
;; sophisticated and can handle subrs, etc
@@ -2835,8 +2331,8 @@ See also `erc-send-command'."
(ignore-errors
;; load an autoloaded function first
(when (equal 'autoload (car-safe def))
- (load (second def))
- (setq def (symbol-function fun)))
+ (load (second def))
+ (setq def (symbol-function fun)))
(if (listp def)
(second def)
(format "[Arglist not available, try %s instead]"
@@ -2862,7 +2358,7 @@ erc-cmd-FOO, this returns a string /FOO.
Returns non-nil if the command is actually sent to the server, and nil
otherwise.
-If the command in the LINE is not boundp as a function `erc-cmd-COMMAND',
+If the command in the LINE is not bound as a function `erc-cmd-<COMMAND>',
it is passed to `erc-cmd-default'. If LINE is not a command (ie. doesn't
start with /<COMMAND>) then it is sent as a message.
@@ -2965,7 +2461,7 @@ Commands for which no erc-cmd-xxx exists
this function. LINE is sent to the server verbatim, and
therefore has to contain the command itself as well."
(erc-log (format "cmd: DEFAULT: %s" line))
- (erc-send-command (substring line 1))
+ (erc-server-send (substring line 1))
t)
(defun erc-cmd-IGNORE (&optional user)
@@ -2990,7 +2486,7 @@ If no USER argument is specified, list t
(defun erc-cmd-UNIGNORE (user)
"Remove the user specified in USER from the ignore list."
(let ((ignored-nick (car (with-current-buffer (erc-server-buffer)
- (member-ignore-case user erc-ignore-list)))))
+ (erc-member-ignore-case user erc-ignore-list)))))
(if (null ignored-nick)
(erc-display-line
(erc-make-notice (format "%s is not currently ignored!" user))
@@ -3016,7 +2512,8 @@ If no USER argument is specified, list t
(let ((cuser (cdr user-data)))
(if (and cuser
(erc-channel-user-op cuser))
- (setq ops (cons (erc-server-user-nickname (car user-data))
+ (setq ops (cons (erc-server-user-nickname
+ (car user-data))
ops)))))
erc-channel-users))
(setq ops (sort ops 'string-lessp))
@@ -3045,7 +2542,7 @@ If no reason is given, unset away status
(when (string-match "^\\s-*\\(.*\\)$" line)
(let ((reason (match-string 1 line)))
(erc-log (format "cmd: AWAY: %s" reason))
- (erc-send-command
+ (erc-server-send
(if (string= reason "")
"AWAY"
(concat "AWAY :" reason))))
@@ -3125,8 +2622,8 @@ If CHANNEL is specified as \"-invite\",
were most recently invited. See also `invitation'."
(let (chnl)
(if (string= (upcase channel) "-INVITE")
- (if invitation
- (setq chnl invitation)
+ (if erc-invitation
+ (setq chnl erc-invitation)
(erc-display-message nil 'error (current-buffer) 'no-invitation))
(setq chnl (erc-ensure-channel-name channel)))
(when chnl
@@ -3134,13 +2631,14 @@ were most recently invited. See also `i
(let ((joined-channels
(mapcar #'(lambda (chanbuf)
(with-current-buffer chanbuf (erc-default-target)))
- (erc-channel-list erc-process))))
+ (erc-channel-list erc-server-process))))
(if (erc-member-ignore-case chnl joined-channels)
- (switch-to-buffer (car (erc-member-ignore-case chnl joined-channels)))
+ (switch-to-buffer (car (erc-member-ignore-case chnl
+ joined-channels)))
(erc-log (format "cmd: JOIN: %s" chnl))
(if (and chnl key)
- (erc-send-command (format "JOIN %s %s" chnl key))
- (erc-send-command (format "JOIN %s" chnl)))))))
+ (erc-server-send (format "JOIN %s %s" chnl key))
+ (erc-server-send (format "JOIN %s" chnl)))))))
t)
(defalias 'erc-cmd-CHANNEL 'erc-cmd-JOIN)
@@ -3166,7 +2664,7 @@ command."
(erc-with-buffer
(tgt)
(erc-channel-begin-receiving-names))
- (erc-send-command (concat "NAMES " tgt)))
+ (erc-server-send (concat "NAMES " tgt)))
(erc-display-message nil 'error (current-buffer) 'no-default-channel)))
t)
(defalias 'erc-cmd-N 'erc-cmd-NAMES)
@@ -3180,7 +2678,8 @@ LINE has the format: \"#CHANNEL NICK REA
(if (erc-channel-p target)
(let ((nick reason-or-nick))
(erc-log (format "cmd: KICK: %s/%s: %s" nick target reasonstring))
- (erc-send-command (format "KICK %s %s :%s" target nick reasonstring))
+ (erc-server-send (format "KICK %s %s :%s" target nick reasonstring)
+ nil target)
t)
(when target
(let ((ch (erc-default-target)))
@@ -3191,8 +2690,8 @@ LINE has the format: \"#CHANNEL NICK REA
(progn
(erc-log
(format "cmd: KICK: %s/%s: %s" target ch reasonstring))
- (erc-send-command
- (format "KICK %s %s :%s" ch target reasonstring)))
+ (erc-server-send
+ (format "KICK %s %s :%s" ch target reasonstring) nil ch))
(erc-display-message nil 'error (current-buffer)
'no-default-channel))
t)))))
@@ -3236,7 +2735,7 @@ If SERVER is non-nil, use that, rather t
(format "WHOIS %s %s" user server)
(format "WHOIS %s" user))))
(erc-log (format "cmd: %s" send))
- (erc-send-command send)
+ (erc-server-send send)
t))
(defalias 'erc-cmd-WI 'erc-cmd-WHOIS)
@@ -3355,37 +2854,6 @@ the matching is case-sensitive."
t)
(put 'erc-cmd-LASTLOG 'do-not-parse-args t)
-(defun erc-message (message-command line &optional force)
- "Send LINE to the server as a privmsg or a notice.
-MESSAGE-COMMAND should be either \"PRIVMSG\" or \"NOTICE\".
-If the target is \",\", the last person you've got a message from will
-be used. If the target is \".\", the last person you've sent a message
-to will be used."
- (cond
- ((string-match "^\\s-*\\(\\S-+\\)\\(\\s-*$\\|\\s-+.*\\)" line)
- (let ((tgt (match-string 1 line))
- (s (match-string 2 line)))
- (erc-log (format "cmd: MSG(%s): [%s] %s" message-command tgt s))
- (if (string-match "^ " s) (setq s (substring s 1)))
- (cond
- ((string= tgt ",")
- (if (car last-peers)
- (setq tgt (car last-peers))
- (setq tgt nil)))
- ((string= tgt ".")
- (if (cdr last-peers)
- (setq tgt (cdr last-peers))
- (setq tgt nil))))
- (cond
- (tgt
- (setcdr last-peers tgt)
- (erc-send-command
- (format "%s %s :%s" message-command tgt s)) force)
- (t
- (erc-display-message nil 'error (current-buffer) 'no-target))))
- t)
- (t nil)))
-
(defun erc-send-message (line &optional force)
"Send LINE to the current channel or user and display it.
@@ -3410,7 +2878,7 @@ A list of valid mode strings for Freenod
((string-match "^\\s-\\(.*\\)$" line)
(let ((s (match-string 1 line)))
(erc-log (format "cmd: MODE: %s" s))
- (erc-send-command (concat "MODE " line)))
+ (erc-server-send (concat "MODE " line)))
t)
(t nil)))
(put 'erc-cmd-MODE 'do-not-parse-args t)
@@ -3438,18 +2906,18 @@ The rest of LINE is the message to send.
(defun erc-cmd-NICK (nick)
"Change current nickname to NICK."
- (erc-log (format "cmd: NICK: %s (bad-nick: %S)" nick bad-nick))
+ (erc-log (format "cmd: NICK: %s (erc-bad-nick: %S)" nick erc-bad-nick))
(let ((nicklen (cdr (assoc "NICKLEN" (with-current-buffer
(erc-server-buffer)
erc-server-parameters)))))
(and nicklen (> (length nick) (string-to-number nicklen))
(erc-display-message
nil 'notice 'active 'nick-too-long
?i (length nick) ?l nicklen)))
- (erc-send-command (format "NICK %s" nick))
- (cond (bad-nick
+ (erc-server-send (format "NICK %s" nick))
+ (cond (erc-bad-nick
(erc-set-current-nick nick)
(erc-update-mode-line)
- (setq bad-nick nil)))
+ (setq erc-bad-nick nil)))
t)
(defun erc-cmd-PART (line)
@@ -3461,10 +2929,10 @@ Otherwise leave the channel indicated by
(msg (match-string 2 line))
(reason (funcall erc-part-reason (if (equal msg "") nil msg))))
(erc-log (format "cmd: PART: %s: %s" ch reason))
- (erc-send-command
- (if (string= reason "")
- (format "PART %s" ch)
- (format "PART %s :%s" ch reason))))
+ (erc-server-send (if (string= reason "")
+ (format "PART %s" ch)
+ (format "PART %s :%s" ch reason))
+ nil ch))
t)
((string-match "^\\s-*\\(.*\\)$" line)
(let* ((ch (erc-default-target))
@@ -3473,10 +2941,10 @@ Otherwise leave the channel indicated by
(if (and ch (erc-channel-p ch))
(progn
(erc-log (format "cmd: PART: %s: %s" ch reason))
- (erc-send-command
- (if (string= reason "")
- (format "PART %s" ch)
- (format "PART %s :%s" ch reason))))
+ (erc-server-send (if (string= reason "")
+ (format "PART %s" ch)
+ (format "PART %s :%s" ch reason))
+ nil ch))
(erc-display-message nil 'error (current-buffer) 'no-target)))
t)
(t nil)))
@@ -3496,7 +2964,7 @@ All the text given as argument is sent t
just as you provided it. Use this command with care!"
(cond
((string-match "^\\s-\\(.+\\)$" line)
- (erc-send-command (match-string 1 line)))
+ (erc-server-send (match-string 1 line)))
(t nil)))
(put 'erc-cmd-QUOTE 'do-not-parse-args t)
@@ -3584,24 +3052,14 @@ the message given by REASON."
buffer
(current-buffer))
(erc-log (format "cmd: QUIT: %s" reason))
- (setq quitting t)
- (erc-send-command (format "QUIT :%s" reason)))
- (run-hook-with-args 'erc-quit-hook erc-process)
+ (setq erc-server-quitting t)
+ (erc-server-send (format "QUIT :%s" reason)))
+ (run-hook-with-args 'erc-quit-hook erc-server-process)
(when erc-kill-queries-on-quit
- (erc-kill-query-buffers erc-process)))
+ (erc-kill-query-buffers erc-server-process)))
t)
(t nil)))
-(defun erc-kill-queries-on-quit (process)
- "Kill all query buffers associated with PROCESS.
-
-This only has effect if the variable `erc-kill-queries-on-quit' is non-nil."
- (when erc-kill-queries-on-quit
- ;; FIXME: This doesn't actually seem to be used anywhere. Also, is
- ;; `erc-process' intentionally passed to `erc-kill-query-buffers'? --
- ;; Lawrence 2004-01-08
- (erc-kill-query-buffers erc-process)))
-
(defalias 'erc-cmd-BYE 'erc-cmd-QUIT)
(defalias 'erc-cmd-EXIT 'erc-cmd-QUIT)
(defalias 'erc-cmd-SIGNOFF 'erc-cmd-QUIT)
@@ -3649,14 +3107,14 @@ This only has effect if the variable `er
((featurep 'x-toolkit) ", X toolkit")
(t ""))
(if (and (boundp 'x-toolkit-scroll-bars)
- (memq x-toolkit-scroll-bars '(xaw xaw3d)))
+ (memq x-toolkit-scroll-bars
+ '(xaw xaw3d)))
(format ", %s scroll bars"
(capitalize (symbol-name
x-toolkit-scroll-bars)))
"")
(if (featurep 'multi-tty) ", multi-tty" ""))
- (format-time-string ", built %Y-%m-%d"
- erc-emacs-build-time)))
+ (concat ", built " erc-emacs-build-time)))
t)
(defun erc-cmd-SM ()
@@ -3674,25 +3132,21 @@ This only has effect if the variable `er
(defun erc-cmd-DEOP (&rest people)
"Remove the operator setting from user(s) given in PEOPLE."
(when (> (length people) 0)
- (erc-send-command (concat "MODE " (erc-default-target)
+ (erc-server-send (concat "MODE " (erc-default-target)
" -"
(make-string (length people) ?o)
" "
- (reduce (lambda (&optional a b)
- (concat a " " b))
- people)))
+ (mapconcat 'identity people " ")))
t))
(defun erc-cmd-OP (&rest people)
"Add the operator setting to users(s) given in PEOPLE."
(when (> (length people) 0)
- (erc-send-command (concat "MODE " (erc-default-target)
+ (erc-server-send (concat "MODE " (erc-default-target)
" +"
(make-string (length people) ?o)
" "
- (reduce (lambda (&optional a b)
- (concat a " " b))
- people)))
+ (mapconcat 'identity people " ")))
t))
(defun erc-cmd-TIME (&optional line)
@@ -3701,9 +3155,9 @@ This only has effect if the variable `er
((and line (string-match "^\\s-*\\(.*\\)$" line))
(let ((args (match-string 1 line)))
(erc-log (format "cmd: TIME: %s" args))
- (erc-send-command (concat "TIME " args)))
+ (erc-server-send (concat "TIME " args)))
t)
- (t (erc-send-command "TIME"))))
+ (t (erc-server-send "TIME"))))
(defalias 'erc-cmd-DATE 'erc-cmd-TIME)
(defun erc-cmd-TOPIC (topic)
@@ -3720,17 +3174,17 @@ be displayed."
(let ((ch (match-string 1 topic))
(topic (match-string 2 topic)))
(erc-log (format "cmd: TOPIC [%s]: %s" ch topic))
- (erc-send-command (format "TOPIC %s :%s" ch topic)))
+ (erc-server-send (format "TOPIC %s :%s" ch topic) nil ch))
t)
;; /topic #channel
((string-match "^\\s-*\\([&#+!]\\S-+\\)" topic)
(let ((ch (match-string 1 topic)))
- (erc-send-command (format "TOPIC %s" ch))
+ (erc-server-send (format "TOPIC %s" ch) nil ch)
t))
;; /topic
((string-match "^\\s-*$" topic)
(let ((ch (erc-default-target)))
- (erc-send-command (format "TOPIC %s" ch))
+ (erc-server-send (format "TOPIC %s" ch) nil ch)
t))
;; /topic TOPIC
((string-match "^\\s-*\\(.*\\)$" topic)
@@ -3739,7 +3193,7 @@ be displayed."
(if (and ch (erc-channel-p ch))
(progn
(erc-log (format "cmd: TOPIC [%s]: %s" ch topic))
- (erc-send-command (format "TOPIC %s :%s" ch topic)))
+ (erc-server-send (format "TOPIC %s :%s" ch topic) nil ch))
(erc-display-message nil 'error (current-buffer) 'no-target)))
t)
(t nil)))
@@ -3748,7 +3202,7 @@ be displayed."
(defun erc-cmd-APPENDTOPIC (topic)
"Append TOPIC to the current channel topic, separated by a space."
- (let ((oldtopic channel-topic))
+ (let ((oldtopic erc-channel-topic))
;; display help when given no arguments
(when (string-match "^\\s-*$" topic)
(signal 'wrong-number-of-arguments nil))
@@ -3764,12 +3218,12 @@ If CHANNEL is not specified, clear the t
(interactive "sClear topic of channel (RET is current channel): ")
(let ((chnl (or (and (erc-channel-p channel) channel) (erc-default-target))))
(when chnl
- (erc-send-command (format "TOPIC %s :" chnl))
+ (erc-server-send (format "TOPIC %s :" chnl))
t)))
;;; Banlists
-(defvar channel-banlist nil
+(defvar erc-channel-banlist nil
"A list of bans seen for the current channel.
Each ban is an alist of the form:
@@ -3777,11 +3231,11 @@ Each ban is an alist of the form:
The property `received-from-server' indicates whether
or not the ban list has been requested from the server.")
-(make-variable-buffer-local 'channel-banlist)
-(put 'channel-banlist 'received-from-server nil)
+(make-variable-buffer-local 'erc-channel-banlist)
+(put 'erc-channel-banlist 'received-from-server nil)
(defun erc-cmd-BANLIST ()
- "Pretty-print the contents of `channel-banlist'.
+ "Pretty-print the contents of `erc-channel-banlist'.
The ban list is fetched from the server if necessary."
(let ((chnl (erc-default-target))
@@ -3789,30 +3243,29 @@ The ban list is fetched from the server
(cond
((not (erc-channel-p chnl))
- (erc-display-line (erc-make-notice
- (format "You're not on a channel\n"))
+ (erc-display-line (erc-make-notice "You're not on a channel\n")
'active))
- ((not (get 'channel-banlist 'received-from-server))
+ ((not (get 'erc-channel-banlist 'received-from-server))
(let ((old-367-hook erc-server-367-functions))
(setq erc-server-367-functions 'erc-banlist-store
- channel-banlist nil)
+ erc-channel-banlist nil)
;; fetch the ban list then callback
(with-current-buffer (erc-server-buffer)
(erc-once-with-server-event
368
`(with-current-buffer ,chnl-name
- (put 'channel-banlist 'received-from-server t)
+ (put 'erc-channel-banlist 'received-from-server t)
(setq erc-server-367-functions ',old-367-hook)
(erc-cmd-BANLIST)
t))
- (erc-send-command (format "MODE %s b" chnl)))))
+ (erc-server-send (format "MODE %s b" chnl)))))
- ((null channel-banlist)
+ ((null erc-channel-banlist)
(erc-display-line (erc-make-notice
(format "No bans for channel: %s\n" chnl))
'active)
- (put 'channel-banlist 'received-from-server nil))
+ (put 'erc-channel-banlist 'received-from-server nil))
(t
(let* ((erc-fill-column (or (and (boundp 'erc-fill-column)
@@ -3843,11 +3296,11 @@ The ban list is fetched from the server
(truncate-string-to-width (car x) (/ erc-fill-column 2))
""))
'active))
- channel-banlist)
+ erc-channel-banlist)
(erc-display-line (erc-make-notice "End of Ban list")
'active)
- (put 'channel-banlist 'received-from-server nil)))))
+ (put 'erc-channel-banlist 'received-from-server nil)))))
t)
(defalias 'erc-cmd-BL 'erc-cmd-BANLIST)
@@ -3861,10 +3314,10 @@ Unban all currently banned users in the
((not (erc-channel-p chnl))
(erc-display-line
- (erc-make-notice (format "You're not on a channel\n"))
+ (erc-make-notice "You're not on a channel\n")
'active))
- ((not (get 'channel-banlist 'received-from-server))
+ ((not (get 'erc-channel-banlist 'received-from-server))
(let ((old-367-hook erc-server-367-functions))
(setq erc-server-367-functions 'erc-banlist-store)
;; fetch the ban list then callback
@@ -3872,21 +3325,21 @@ Unban all currently banned users in the
(erc-once-with-server-event
368
`(with-current-buffer ,chnl
- (put 'channel-banlist 'received-from-server t)
+ (put 'erc-channel-banlist 'received-from-server t)
(setq erc-server-367-functions ,old-367-hook)
(erc-cmd-MASSUNBAN)
t))
- (erc-send-command (format "MODE %s b" chnl)))))
+ (erc-server-send (format "MODE %s b" chnl)))))
- (t (let ((bans (mapcar 'cdr channel-banlist)))
+ (t (let ((bans (mapcar 'cdr erc-channel-banlist)))
(when bans
;; Glob the bans into groups of three, and carry out the unban.
;; eg. /mode #foo -bbb a*!*@* b*!*@* c*!*@*
(mapc
(lambda (x)
- (erc-send-command
- (format "MODE %s -%s %s" (erc-default-target)
- (make-string (length x) (string-to-char "b"))
+ (erc-server-send
+ (format "MODE %s -%s %s" (erc-default-target)
+ (make-string (length x) (string-to-char "b"))
(mapconcat 'identity x " "))))
(erc-group-list bans 3))))
t))))
@@ -3959,11 +3412,6 @@ If FACE is non-nil, it will be used to p
(erc-put-text-property 0 (1- (length prompt))
'face (or face 'erc-prompt-face)
prompt)
- ;; Removed -- Lawrence 2004-01-08
- ;; (when erc-prompt-interactive-input
- ;; (setq prompt (erc-propertize prompt
- ;; 'local-map
- ;; (erc-interactive-input-map))))
(insert prompt))
;; Now we are back at the old position. If the prompt was
@@ -3978,19 +3426,6 @@ If FACE is non-nil, it will be used to p
;; interactive operations
-;; Removed -- Lawrence 2004-01-08. If someone wants this, I'll have a look at
-;; fixing it.
-
-;; (defun erc-interactive-input-map ()
-;; "Create an input map that called `erc-input-message' when an ASCII
-;; character (one between 32 and 127) is entered. This is installed as an
-;; input map when `erc-prompt-interactive-input' is set to non-nil.
-;; Obsolete as of 1.348."
-;; (let ((lm (make-sparse-keymap)))
-;; (loop for c from 32 to 127
-;; do (define-key lm (vector c) 'erc-input-message))
-;; lm))
-
(defun erc-input-message ()
"Read input from the minibuffer."
(interactive)
@@ -4020,8 +3455,8 @@ If `point' is at the beginning of a chan
(list
(let ((chnl (if (looking-at "\\([&#+!][^ ]+\\)") (match-string 1)
""))
(table (when (erc-server-buffer-live-p)
- (set-buffer (process-buffer erc-process))
- channel-list)))
+ (set-buffer (process-buffer erc-server-process))
+ erc-channel-list)))
(completing-read "Join channel: " table nil nil nil nil chnl))
(when erc-prompt-for-channel-key
(read-from-minibuffer "Channel key (RET for none): " nil))))
@@ -4044,9 +3479,9 @@ If `point' is at the beginning of a chan
(list
(read-from-minibuffer
(concat "Set topic of " (erc-default-target) ": ")
- (when (boundp 'channel-topic)
- (cons (apply 'concat (butlast (split-string channel-topic
"\C-o")))
- 0)))))
+ (when erc-channel-topic
+ (cons (apply 'concat (butlast (split-string erc-channel-topic
"\C-o")))
+ 0)))))
(let ((topic-list (split-string topic "\C-o"))) ; strip off the topic
setter
(erc-cmd-TOPIC (concat (erc-default-target) " " (car topic-list)))))
@@ -4058,8 +3493,8 @@ Prompt for one if called interactively."
(erc-default-target)))))
(let ((tgt (erc-default-target)))
(if (and limit (>= (length limit) 1))
- (erc-send-command (format "MODE %s +l %s" tgt limit))
- (erc-send-command (format "MODE %s -l" tgt)))))
+ (erc-server-send (format "MODE %s +l %s" tgt limit))
+ (erc-server-send (format "MODE %s -l" tgt)))))
(defun erc-set-channel-key (&optional key)
"Set a KEY for the current channel. Remove key if nil.
@@ -4069,15 +3504,16 @@ Prompt for one if called interactively."
(erc-default-target)))))
(let ((tgt (erc-default-target)))
(if (and key (>= (length key) 1))
- (erc-send-command (format "MODE %s +k %s" tgt key))
- (erc-send-command (format "MODE %s -k" tgt)))))
+ (erc-server-send (format "MODE %s +k %s" tgt key))
+ (erc-server-send (format "MODE %s -k" tgt)))))
(defun erc-quit-server (reason)
"Disconnect from current server after prompting for REASON.
`erc-quit-reason' works with this just like with `erc-cmd-QUIT'."
(interactive (list (read-from-minibuffer
(format "Reason for quitting %s: "
- erc-announced-server-name))))
+ (or erc-server-announced-name
+ erc-session-server)))))
(erc-cmd-QUIT reason))
;; Movement of point
@@ -4157,22 +3593,6 @@ See `erc-default-server-hook'."
(nconc erc-server-vectors (list parsed))
nil)
-(defvar erc-duplicates (make-hash-table :test 'equal)
- "Internal variable used to track duplicate messages.")
-(make-variable-buffer-local 'erc-duplicates)
-
-(defvar erc-duplicate-timeout 60
- ;; FIXME: is this docstring correct? -- Lawrence 2004-01-08
- "The time in seconds between duplicate messages.
-
-If two identical messages arrive within this value of one another, the second
-isn't displayed.")
-
-(defvar erc-prevent-duplicates '("301")
- "*Either nil or a list of strings.
-Each string is a IRC message type, like PRIVMSG or NOTICE.
-All Message types in that list of subjected to duplicate prevention.")
-
(defun erc-query (target server)
"Open a query buffer on TARGET, using SERVER.
To change how this query window is displayed, use `let' to bind
@@ -4189,7 +3609,7 @@ To change how this query window is displ
nil
(list target)
target
- erc-process)))
+ erc-server-process)))
(unless buf
(error "Couldn't open query window"))
(erc-update-mode-line)
@@ -4271,18 +3691,19 @@ See also `erc-display-error-notice'."
(nicklen (cdr (assoc "NICKLEN"
(with-current-buffer (erc-server-buffer)
erc-server-parameters)))))
- (setq bad-nick t)
+ (setq erc-bad-nick t)
;; try to use a different nick
(if erc-default-nicks
(setq erc-default-nicks (cdr erc-default-nicks)))
(if (not newnick)
(setq newnick (concat (truncate-string-to-width
nick
- (if (and erc-connected nicklen)
- (- (string-to-int nicklen) 1)
+ (if (and erc-server-connected nicklen)
+ (- (string-to-number nicklen) 1)
;; rfc2812 max nick length = 9
- ;; we must assume this is the server's setting
- ;; if we haven't established a connection yet
+ ;; we must assume this is the
+ ;; server's setting if we haven't
+ ;; established a connection yet
8))
erc-nick-uniquifier)))
(erc-cmd-NICK newnick)
@@ -4293,7 +3714,6 @@ See also `erc-display-error-notice'."
;;; Server messages
-
(defgroup erc-server-hooks nil
"Server event callbacks.
Every server event - like numeric replies - has it's own hook.
@@ -4308,36 +3728,6 @@ and as second argument the event parsed
(erc-display-message
parsed 'notice 'active (erc-response.contents parsed)))
-(defvar erc-lag nil
- "Calculated server lag time in seconds.
-This variable is only set in a server buffer.")
-(make-variable-buffer-local 'erc-lag)
-
-(defcustom erc-send-ping-interval 90
- "*Interval of sending pings to the server, in seconds.
-If this is set to nil, pinging the server is disabled."
- :group 'erc
- :type '(choice (const nil) (integer :tag "Seconds")))
-
-(defvar erc-ping-handler nil
- "This variable holds the periodic ping timer.")
-(make-variable-buffer-local 'erc-ping-handler)
-
-(defun erc-setup-periodical-server-ping (&rest ignore)
- "Set up a timer to periodically ping the current server."
- (and erc-ping-handler (erc-cancel-timer erc-ping-handler))
- (when erc-send-ping-interval
- (setq erc-ping-handler
- (run-with-timer
- 4 erc-send-ping-interval
- (lambda (buf)
- (when (buffer-live-p buf)
- (with-current-buffer buf
- (erc-send-command
- (format "PING %.0f"
- (erc-current-time))))))
- (current-buffer)))))
-
(defun erc-auto-query (proc parsed)
;; FIXME: This needs more documentation, unless it's not a user function --
;; Lawrence 2004-01-08
@@ -4478,7 +3868,7 @@ sender is a member.
See also: `erc-echo-notice-in-first-user-buffer',
`erc-buffer-list-with-nick'"
- (let ((buffers (erc-buffer-list-with-nick sender erc-process)))
+ (let ((buffers (erc-buffer-list-with-nick sender erc-server-process)))
(if buffers
(progn (erc-display-message parsed nil buffers s) t)
nil)))
@@ -4493,7 +3883,7 @@ default target.
See also: `erc-echo-notice-in-user-buffers',
`erc-buffer-list-with-nick'"
- (let ((buffers (erc-buffer-list-with-nick sender erc-process)))
+ (let ((buffers (erc-buffer-list-with-nick sender erc-server-process)))
(add-to-list 'buffers buffer)
(if buffers
(progn (erc-display-message parsed nil buffers s) t)
@@ -4508,14 +3898,11 @@ sender is a member.
See also: `erc-echo-notice-in-user-buffers',
`erc-buffer-list-with-nick'"
- (let ((buffers (erc-buffer-list-with-nick sender erc-process)))
+ (let ((buffers (erc-buffer-list-with-nick sender erc-server-process)))
(if buffers
(progn (erc-display-message parsed nil (car buffers) s) t)
nil)))
-(defvar erc-server-version nil)
-(make-variable-buffer-local 'erc-server-version)
-
;;; Ban manipulation
(defun erc-banlist-store (proc parsed)
@@ -4525,8 +3912,9 @@ See also: `erc-echo-notice-in-user-buffe
;; Determine to which buffer the message corresponds
(let ((buffer (erc-get-buffer channel proc)))
(with-current-buffer buffer
- (unless (member (cons whoset mask) channel-banlist)
- (setq channel-banlist (cons (cons whoset mask) channel-banlist))))))
+ (unless (member (cons whoset mask) erc-channel-banlist)
+ (setq erc-channel-banlist (cons (cons whoset mask)
+ erc-channel-banlist))))))
nil)
(defun erc-banlist-finished (proc parsed)
@@ -4534,37 +3922,37 @@ See also: `erc-echo-notice-in-user-buffe
(let* ((channel (second (erc-response.command-args parsed)))
(buffer (erc-get-buffer channel proc)))
(with-current-buffer buffer
- (put 'channel-banlist 'received-from-server t)))
+ (put 'erc-channel-banlist 'received-from-server t)))
t) ; suppress the 'end of banlist' message
(defun erc-banlist-update (proc parsed)
"Check MODE commands for bans and update the banlist appropriately."
;; FIXME: Possibly incorrect. -- Lawrence 2004-05-11
(let* ((tgt (first (erc-response.command-args parsed)))
- (mode (erc-response.contents parsed))
+ (mode (erc-response.contents parsed))
(whoset (erc-response.sender parsed))
- (buffer (erc-get-buffer tgt proc)))
+ (buffer (erc-get-buffer tgt proc)))
(when buffer
(with-current-buffer buffer
- (cond ((not (get 'channel-banlist 'received-from-server)) nil)
+ (cond ((not (get 'erc-channel-banlist 'received-from-server)) nil)
((string-match "^\\([+-]\\)b" mode)
- ;; This is a ban
- (cond
- ((string-match "^-" mode)
- ;; Remove the unbanned masks from the ban list
- (setq channel-banlist
+ ;; This is a ban
+ (cond
+ ((string-match "^-" mode)
+ ;; Remove the unbanned masks from the ban list
+ (setq erc-channel-banlist
(delete-if
- (lambda (y)
- (member (upcase (cdr y))
- (mapcar #'upcase (cdr (split-string mode)))))
- channel-banlist)))
- ((string-match "^+" mode)
- ;; Add the banned mask(s) to the ban list
- (mapc
- (lambda (mask)
- (unless (member (cons whoset mask) channel-banlist)
- (setq channel-banlist
- (cons (cons whoset mask) channel-banlist))))
+ (lambda (y)
+ (member (upcase (cdr y))
+ (mapcar #'upcase (cdr (split-string mode)))))
+ erc-channel-banlist)))
+ ((string-match "^+" mode)
+ ;; Add the banned mask(s) to the ban list
+ (mapc
+ (lambda (mask)
+ (unless (member (cons whoset mask) erc-channel-banlist)
+ (setq erc-channel-banlist
+ (cons (cons whoset mask) erc-channel-banlist))))
(cdr (split-string mode))))))))))
nil)
@@ -4572,24 +3960,9 @@ See also: `erc-echo-notice-in-user-buffe
(defun erc-group-list (list n)
"Group LIST into sublists of length N."
(cond ((null list) nil)
- ((null (nthcdr n list)) (list list))
+ ((null (nthcdr n list)) (list list))
(t (cons (subseq list 0 n) (erc-group-list (nthcdr n list) n)))))
-;; Is this faster? Does it matter? Was I bored? :P -- Lawrence 2004-01-08
-;; (defun erc-group-list-1 (list n)
-;; (let ((i 0)
-;; result)
-;; (while list
-;; (setq result
-;; (nconc result (let (res)
-;; (while (and (car list)
-;; (< i n))
-;; (setq res (nconc res (list (pop list))))
-;; (setq i (1+ i)))
-;; (list res))))
-;; (setq i 0))
-;; result))
-
;;; MOTD numreplies
@@ -4607,13 +3980,13 @@ See also: `erc-echo-notice-in-user-buffe
"Run just after connection.
Set user modes and run `erc-after-connect hook'."
- (unless erc-connected ; only once per session
- (let ((server (or erc-announced-server-name (erc-response.sender parsed)))
+ (unless erc-server-connected ; only once per session
+ (let ((server (or erc-server-announced-name (erc-response.sender parsed)))
(nick (car (erc-response.command-args parsed ))))
- (setq erc-connected t)
+ (setq erc-server-connected t)
(erc-update-mode-line)
(erc-set-initial-user-mode nick)
- (erc-setup-periodical-server-ping)
+ (erc-server-setup-periodical-server-ping)
(run-hook-with-args 'erc-after-connect server nick))))
(defun erc-set-initial-user-mode (nick)
@@ -4624,7 +3997,7 @@ Set user modes and run `erc-after-connec
erc-user-mode)))
(when (stringp mode)
(erc-log (format "changing mode for %s to %s" nick mode))
- (erc-send-command (format "MODE %s %s" nick mode))))))
+ (erc-server-send (format "MODE %s %s" nick mode))))))
(defun erc-display-error-notice (parsed string)
"Display STRING as an error notice.
@@ -4715,7 +4088,7 @@ See also `erc-display-message'."
(user-full-name)
(user-login-name)
(system-name))))
- (ns (erc-time-diff last-sent-time (erc-current-time))))
+ (ns (erc-time-diff erc-server-last-sent-time (erc-current-time))))
(when (> ns 0)
(setq s (concat s " Idle for " (erc-sec-to-time ns))))
(erc-send-ctcp-notice nick s)))
@@ -4850,13 +4223,13 @@ See also `erc-display-message'."
(cond
(away-p
(erc-with-all-buffers-of-server proc nil
- (setq away (current-time))))
+ (setq erc-away (current-time))))
(t
- (let ((away-time away))
+ (let ((away-time erc-away))
;; away must be set to NIL BEFORE sending anything to prevent
;; an infinite recursion
(erc-with-all-buffers-of-server proc nil
- (setq away nil))
+ (setq erc-away nil))
(save-excursion
(set-buffer (erc-active-buffer))
(when erc-public-away-p
@@ -5030,7 +4403,7 @@ See also: `erc-update-user' and `erc-upd
host login full-name info)))
(when add
(if (null user)
- (progn
+ (progn
(setq user (make-erc-server-user
:nickname nick
:host host
@@ -5093,13 +4466,11 @@ See also `erc-remove-current-channel-mem
If optional MODIFY is 'append or 'prepend, then append or prepend the
TOPIC string to the current topic."
(erc-with-buffer (channel)
- (unless (boundp 'channel-topic)
- (error "`channel-topic' appears to be unbound. Please report as a
bug"))
(cond ((eq modify 'append)
- (setq channel-topic (concat channel-topic topic)))
+ (setq erc-channel-topic (concat erc-channel-topic topic)))
((eq modify 'prepend)
- (setq channel-topic (concat topic channel-topic)))
- (t (setq channel-topic topic)))
+ (setq erc-channel-topic (concat topic erc-channel-topic)))
+ (t (setq erc-channel-topic topic)))
(erc-update-mode-line-buffer (current-buffer))))
(defun erc-set-modes (tgt mode-string)
@@ -5110,13 +4481,13 @@ TOPIC string to the current topic."
;; list of triples: (mode-char 'on/'off argument)
(arg-modes (nth 2 modes)))
(cond ((erc-channel-p tgt); channel modes
- (let ((buf (and (boundp 'erc-process) erc-process
- (erc-get-buffer tgt erc-process))))
+ (let ((buf (and (boundp 'erc-server-process) erc-server-process
+ (erc-get-buffer tgt erc-server-process))))
(when buf
(with-current-buffer buf
- (setq channel-modes add-modes)
- (setq channel-user-limit nil)
- (setq channel-key nil)
+ (setq erc-channel-modes add-modes)
+ (setq erc-channel-user-limit nil)
+ (setq erc-channel-key nil)
(while arg-modes
(let ((mode (nth 0 (car arg-modes)))
(onoff (nth 1 (car arg-modes)))
@@ -5202,22 +4573,24 @@ person who changed the modes."
(arg-modes (nth 2 modes)))
;; now parse the modes changes and do the updates
(cond ((erc-channel-p tgt); channel modes
- (let ((buf (and (boundp 'erc-process) erc-process
- (erc-get-buffer tgt erc-process))))
+ (let ((buf (and (boundp 'erc-server-process) erc-server-process
+ (erc-get-buffer tgt erc-server-process))))
(when buf
;; FIXME! This used to have an original buffer
;; variable, but it never switched back to the original
;; buffer. Is this wanted behavior?
(set-buffer buf)
- (if (not (boundp 'channel-modes))
- (setq channel-modes nil))
+ (if (not (boundp 'erc-channel-modes))
+ (setq erc-channel-modes nil))
(while remove-modes
- (setq channel-modes (delete (car remove-modes) channel-modes)
+ (setq erc-channel-modes (delete (car remove-modes)
+ erc-channel-modes)
remove-modes (cdr remove-modes)))
(while add-modes
- (setq channel-modes (cons (car add-modes) channel-modes)
+ (setq erc-channel-modes (cons (car add-modes)
+ erc-channel-modes)
add-modes (cdr add-modes)))
- (setq channel-modes (erc-sort-strings channel-modes))
+ (setq erc-channel-modes (erc-sort-strings erc-channel-modes))
(while arg-modes
(let ((mode (nth 0 (car arg-modes)))
(onoff (nth 1 (car arg-modes)))
@@ -5244,15 +4617,15 @@ person who changed the modes."
(and (stringp n) (string-match "^[0-9]+$" n)))
(erc-with-buffer
(channel)
- (cond ((eq onoff 'on) (setq channel-user-limit (string-to-number n)))
- (t (setq channel-user-limit nil))))))
+ (cond ((eq onoff 'on) (setq erc-channel-user-limit (string-to-number n)))
+ (t (setq erc-channel-user-limit nil))))))
(defun erc-update-channel-key (channel onoff key)
"Update CHANNEL's key to KEY if ONOFF is 'on or to nil if it's
'off."
(erc-with-buffer
(channel)
- (cond ((eq onoff 'on) (setq channel-key key))
- (t (setq channel-key nil)))))
+ (cond ((eq onoff 'on) (setq erc-channel-key key))
+ (t (setq erc-channel-key nil)))))
(defun erc-handle-user-status-change (type nlh &optional l)
"Handle changes in any user's status.
@@ -5265,7 +4638,7 @@ and L is a list containing additional TY
So far the following TYPE/L pairs are supported:
- event TYP L
+ Event TYPE L
nickname change 'nick (NEW-NICK)"
(erc-log (format "user-change: type: %S nlh: %S l: %S" type nlh l))
@@ -5389,11 +4762,11 @@ Specifically, return the position of `er
(let ((inhibit-read-only t)
(str (erc-user-input))
(old-buf (current-buffer)))
-
+
;; Kill the input and the prompt
(delete-region (erc-beg-of-input-line)
(erc-end-of-input-line))
-
+
(unwind-protect
(erc-send-input str)
;; Fix the buffer if the command didn't kill it
@@ -5402,12 +4775,12 @@ Specifically, return the position of `er
(save-restriction
(widen)
(goto-char (point-max))
- (set-marker (process-mark erc-process) (point))
+ (set-marker (process-mark erc-server-process) (point))
(set-marker erc-insert-marker (point))
(let ((buffer-modified (buffer-modified-p)))
(erc-display-prompt)
(set-buffer-modified-p buffer-modified))))))
-
+
;; Only when last hook has been run...
(run-hook-with-args 'erc-send-completed-hook str))))))
@@ -5428,76 +4801,73 @@ This returns non-nil only iff we actuall
(cond
;; Ignore empty input
((if erc-send-whitespace-lines
- (string= input "")
+ (string= input "")
(string-match "\\`[ \t\r\f\n]*\\'" input))
(when erc-warn-about-blank-lines
(message "Blank line - ignoring...")
(beep))
nil)
(t
- (let ((str input))
+ (let ((str input)
+ (erc-insert-this t))
(setq erc-send-this t)
- (setq erc-insert-this t)
(run-hook-with-args 'erc-send-pre-hook input)
+ (when erc-send-this
+ (if (or (string-match "\n" str)
+ (not (char-equal (aref str 0) ?/)))
+ (mapc
+ (lambda (line)
+ (mapc
+ (lambda (line)
+ ;; Insert what has to be inserted for this.
+ (erc-display-msg line)
+ (erc-process-input-line (concat line "\n")
+ (null erc-flood-protect) t))
+ (erc-split-line line)))
+ (split-string str "\n"))
+ ;; Insert the prompt along with the command.
+ (erc-display-command str)
+ (erc-process-input-line (concat str "\n") t nil))
+ t)))))
- (if (string-match "\n" str)
- (mapc
- (lambda (line)
- (erc-send-single-line line
- nil
- erc-send-this
- erc-insert-this))
- (split-string str "\n"))
- (erc-send-single-line str
- t
- erc-send-this
- erc-insert-this))
- t))))
-
-(defun erc-send-single-line (line command-allowed-p
- erc-send-this erc-insert-this)
- "Treat LINE as a single line typed by the user. Handle commands only
-if COMMAND-ALLOWED-P is non-nil."
- (when erc-send-this
- (let ((insert-position (point)))
- (when erc-insert-this
- ;; Insert what has to be inserted for this. If it's a command,
- ;; that would be the prompt with the command.
- (if (and command-allowed-p
- (char-equal (aref line 0) ?/))
- (erc-display-command line)
- (erc-display-msg line))
- (set-marker (process-mark erc-process) (point))
- (set-marker erc-insert-marker (point))
- (save-excursion
- (save-restriction
- (narrow-to-region insert-position (point))
- (run-hooks 'erc-send-modify-hook)
- (run-hooks 'erc-send-post-hook))))
- (erc-process-input-line (concat line "\n")
- t
- (not command-allowed-p)))))
-
(defun erc-display-command (line)
- (unless erc-hide-prompt
- (erc-display-prompt nil nil (erc-command-indicator)
- (and (erc-command-indicator)
- 'erc-command-indicator-face)))
- (let ((beg (point)))
- (insert line)
- (erc-put-text-property beg (point)
- 'face 'erc-command-indicator-face)
- (insert "\n")))
+ (when erc-insert-this
+ (let ((insert-position (point)))
+ (unless erc-hide-prompt
+ (erc-display-prompt nil nil (erc-command-indicator)
+ (and (erc-command-indicator)
+ 'erc-command-indicator-face)))
+ (let ((beg (point)))
+ (insert line)
+ (erc-put-text-property beg (point)
+ 'face 'erc-command-indicator-face)
+ (insert "\n"))
+ (set-marker (process-mark erc-server-process) (point))
+ (set-marker erc-insert-marker (point))
+ (save-excursion
+ (save-restriction
+ (narrow-to-region insert-position (point))
+ (run-hooks 'erc-send-modify-hook)
+ (run-hooks 'erc-send-post-hook))))))
(defun erc-display-msg (line)
"Display LINE as a message of the user to the current target at the
current position."
- (insert (erc-format-my-nick))
- (let ((beg (point)))
- (insert line)
- (erc-put-text-property beg (point)
- 'face 'erc-input-face))
- (insert "\n"))
+ (when erc-insert-this
+ (let ((insert-position (point)))
+ (insert (erc-format-my-nick))
+ (let ((beg (point)))
+ (insert line)
+ (erc-put-text-property beg (point)
+ 'face 'erc-input-face))
+ (insert "\n")
+ (set-marker (process-mark erc-server-process) (point))
+ (set-marker erc-insert-marker (point))
+ (save-excursion
+ (save-restriction
+ (narrow-to-region insert-position (point))
+ (run-hooks 'erc-send-modify-hook)
+ (run-hooks 'erc-send-post-hook))))))
(defun erc-extract-command-from-line (line)
"Extract command and args from the input LINE.
@@ -5541,14 +4911,14 @@ strings over to the next call."
"Set the current nickname to NICK."
(with-current-buffer (or (erc-server-buffer)
(current-buffer))
- (setq current-nick nick)))
+ (setq erc-server-current-nick nick)))
(defun erc-current-nick ()
"Return the current nickname."
(with-current-buffer (if (buffer-live-p (erc-server-buffer))
(erc-server-buffer)
(current-buffer))
- current-nick))
+ erc-server-current-nick))
(defun erc-current-nick-p (nick)
"Return non-nil if NICK is the current nickname."
@@ -5576,23 +4946,11 @@ See also `erc-downcase'."
(defun erc-add-default-channel (channel)
"Add CHANNEL to the default channel list."
-;;; This is no longer true. The channel is added to another window
-;;; and we don't want to mess the target there.
-;"If the current default
-;recipient is of QUERY type, then push the new default channel *after*
-;the head"
-
(let ((d1 (car erc-default-recipients))
(d2 (cdr erc-default-recipients))
(chl (downcase channel)))
-; (if (and (listp d1)
-; (eq (car d1) 'QUERY))
-; (setq erc-default-recipients
-; (cons d1 (cons chl d2)))
(setq erc-default-recipients
- (cons chl erc-default-recipients))
-;)
- ))
+ (cons chl erc-default-recipients))))
(defun erc-delete-default-channel (channel &optional buffer)
"Delete CHANNEL from the default channel list."
@@ -5637,23 +4995,6 @@ match, returns that regexp."
;; We have `require'd cl, so we can return from the block named nil
(return ignored))))
-;; FIXME: with-erc-channel-buffer suffers from multiple
-;; evaluation. Also it is used in one single place in erc.el. It
-;; should be fixed or removed and replaced with `erc-with-buffer'.
-(defmacro with-erc-channel-buffer (tgt proc &rest body)
- "Execute BODY for channel TGT and process PROC."
- `(if (not (and (stringp ,tgt)
- (erc-channel-p ,tgt)
- (processp ,proc)))
- nil
- (let ((buffer (erc-get-buffer ,tgt ,proc)))
- (if (not (bufferp buffer))
- nil
- (with-current-buffer buffer
- ,@body)))))
-(put 'with-erc-channel-buffer 'lisp-indent-function 1)
-(put 'with-erc-channel-buffer 'edebug-form-spec '(form form body))
-
(defun erc-ignored-reply-p (msg tgt proc)
;; FIXME: this docstring needs fixing -- Lawrence 2004-01-08
"Return non-nil if MSG matches something in `erc-ignore-reply-list'.
@@ -5663,12 +5004,11 @@ user matches any regexp in `erc-ignore-r
(let ((target-nick (erc-message-target msg)))
(if (not target-nick)
nil
- (with-erc-channel-buffer
- tgt proc
- (let ((user (erc-get-server-user target-nick)))
- (when user
- (erc-list-match erc-ignore-reply-list
- (erc-user-spec user))))))))
+ (erc-with-buffer (tgt proc)
+ (let ((user (erc-get-server-user target-nick)))
+ (when user
+ (erc-list-match erc-ignore-reply-list
+ (erc-user-spec user))))))))
(defun erc-message-target (msg)
"Return the addressed target in MSG.
@@ -5684,16 +5024,16 @@ The addressed target is the string befor
(host (erc-server-user-host user))
(login (erc-server-user-login user)))
(concat (if nick
- nick
- "")
- "!"
- (if login
- login
- "")
- "@"
- (if host
- host
- ""))))
+ nick
+ "")
+ "!"
+ (if login
+ login
+ "")
+ "@"
+ (if host
+ host
+ ""))))
(defun erc-list-match (lst str)
"Return non-nil if any regexp in LST matches STR."
@@ -5721,18 +5061,13 @@ If ARG is non-nil and not positive, turn
If ARG is positive, select strict control.
If ARG is non-nil and not positive, select normal control.
-If ARG is nil, and `erc-flood-protect' is strict, select no control."
+If ARG is nil, and `erc-flood-protect' is normal, select no control."
(interactive "P")
- (cond ((and (numberp arg) (> arg 0))
- (setq erc-flood-protect 'strict))
- (arg (setq erc-flood-protect 'normal))
- ((eq erc-flood-protect 'strict)
- (setq erc-flood-protect nil))
- (erc-flood-protect (setq erc-flood-protect 'strict))
+ (cond (arg (setq erc-flood-protect 'normal))
+ (erc-flood-protect (setq erc-flood-protect nil))
(t (setq erc-flood-protect 'normal)))
(message "ERC flood control is %s"
- (cond ((eq erc-flood-protect 'strict) "STRICT")
- (erc-flood-protect "NORMAL")
+ (cond (erc-flood-protect "NORMAL")
(t "OFF"))))
;; Some useful channel and nick commands for fast key bindings
@@ -5787,13 +5122,13 @@ If CHANNEL is non-nil, toggle MODE for t
(erc-force-send t))
(cond ((or (null tgt) (null (erc-channel-p tgt)))
(erc-display-message nil 'error 'active 'no-target))
- ((member mode channel-modes)
+ ((member mode erc-channel-modes)
(erc-log (format "%s: Toggle mode %s OFF" tgt mode))
(message "Toggle channel mode %s OFF" mode)
- (erc-send-command (format "MODE %s -%s" tgt mode)))
+ (erc-server-send (format "MODE %s -%s" tgt mode)))
(t (erc-log (format "%s: Toggle channel mode %s ON" tgt mode))
(message "Toggle channel mode %s ON" mode)
- (erc-send-command (format "MODE %s +%s" tgt mode))))))
+ (erc-server-send (format "MODE %s +%s" tgt mode))))))
(defun erc-insert-mode-command ()
"Insert the line \"/mode <current target> \" at
`point'."
@@ -5981,10 +5316,10 @@ user input."
erc-session-server
erc-session-user-full-name))
(if erc-session-password
- (erc-send-command (format "PASS %s" erc-session-password))
+ (erc-server-send (format "PASS %s" erc-session-password))
(message "Logging in without password"))
- (erc-send-command (format "NICK %s" (erc-current-nick)))
- (erc-send-command
+ (erc-server-send (format "NICK %s" (erc-current-nick)))
+ (erc-server-send
(format "USER %s %s %s :%s"
;; hacked - S.B.
(if erc-anonymous-login erc-email-userid (user-login-name))
@@ -6001,7 +5336,7 @@ Sets the buffer local variables:
- erc-session-server
- erc-session-port
- erc-session-full-name
-- current-nick"
+- erc-server-current-nick"
(setq erc-session-server (erc-compute-server server)
erc-session-port (or port erc-default-port)
erc-session-user-full-name (erc-compute-full-name name))
@@ -6208,39 +5543,12 @@ entry of `channel-members'."
""))
user))))
-;; (defun erc-operator-p (nick &optional channel)
-;; "Report if NICK is a channel operator on CHANNEL.
-
-;; If CHANNEL is nil, use `erc-default-target'."
-;; ;; Unfinished yet. This is intended to be a saveguard to prevent
-;; ;; doing things which require op rights client-side.
-;; ;; Interactively it could prevent looking in the info buffer or doing
-;; ;; C-c C-n and looking for the nick.
-;; (interactive (list (let ((nickinfo (erc-nick-at-point)))
-;; (if nickinfo
-;; nickinfo
-;; (read-from-minibuffer "Nick: ")))
-;; (erc-default-target)))
-;; (let ((result))
-;; (cond ((and (string= channel (erc-default-target)) (stringp nick))
-;; (setq result (car (cdr (assoc nick channel-members)))))
-;; ((listp nick)
-;; (progn (setq result (car (cdr nick)))
-;; (setq nick (car nick))))
-;; (t (error "Not implemented")))
-;; (if (interactive-p)
-;; (message "%s %s operator on %s"
-;; nick
-;; (if result "is" "is not")
-;; channel)
-;; result)))
-
(defun erc-away-p ()
"Return t if the current ERC process is set away."
(save-excursion
(and (erc-server-buffer-live-p)
- (set-buffer (process-buffer erc-process))
- away)))
+ (set-buffer (process-buffer erc-server-process))
+ erc-away)))
;; Mode line handling
@@ -6258,7 +5566,7 @@ The following characters are replaced:
%p: The session port
%t: The name of the target (channel, nickname, or servername:port)
%s: In the server-buffer, this gets filled with the value of
- `erc-announced-server-name', in a channel, the value of
+ `erc-server-announced-name', in a channel, the value of
(erc-default-target) also get concatenated."
:group 'erc-mode-line-and-header
:type 'string)
@@ -6316,20 +5624,17 @@ format-time-message."
(defun erc-format-target ()
"Return the name of the target (channel or nickname or servername:port)."
(let ((target (erc-default-target)))
- (if target
- target
- (concat (erc-shorten-server-name
- (if (boundp 'erc-announced-server-name)
- erc-announced-server-name
- erc-session-server))
- ":" (erc-port-to-string erc-session-port)))))
+ (or target
+ (concat (erc-shorten-server-name
+ (or erc-server-announced-name
+ erc-session-server))
+ ":" (erc-port-to-string erc-session-port)))))
(defun erc-format-target-and/or-server ()
"Return the server name or the current target and server name combined."
(let ((server-name (erc-shorten-server-name
- (if (boundp 'erc-announced-server-name)
- erc-announced-server-name
- erc-session-server))))
+ (or erc-server-announced-name
+ erc-session-server))))
(cond ((erc-default-target)
(concat (erc-string-no-properties (erc-default-target))
"@" server-name))
@@ -6337,10 +5642,11 @@ format-time-message."
(t (buffer-name (current-buffer))))))
(defun erc-format-away-status ()
- "Return a formatted `erc-mode-line-away-status-format' if `away' is
non-nil."
+ "Return a formatted `erc-mode-line-away-status-format'
+if `erc-away' is non-nil."
(let ((a (when (erc-server-buffer-live-p)
- (with-current-buffer (process-buffer erc-process)
- away))))
+ (with-current-buffer (process-buffer erc-server-process)
+ erc-away))))
(if a
(format-time-string erc-mode-line-away-status-format a)
"")))
@@ -6348,20 +5654,21 @@ format-time-message."
(defun erc-format-channel-modes ()
"Return the current channel's modes and the estimated lag."
(let ((lag (when (erc-server-buffer-live-p)
- (with-current-buffer (process-buffer erc-process)
- erc-lag))))
+ (with-current-buffer (process-buffer erc-server-process)
+ erc-server-lag))))
(concat (apply 'concat
- "(+" channel-modes)
- (cond ((and channel-user-limit channel-key)
+ "(+" erc-channel-modes)
+ (cond ((and erc-channel-user-limit erc-channel-key)
(if erc-show-channel-key-p
- (format "lk %.0f %s" channel-user-limit channel-key)
- (format "kl %.0f" channel-user-limit)))
- (channel-user-limit
+ (format "lk %.0f %s" erc-channel-user-limit
+ erc-channel-key)
+ (format "kl %.0f" erc-channel-user-limit)))
+ (erc-channel-user-limit
;; Emacs has no bignums
- (format "l %.0f" channel-user-limit))
- (channel-key
+ (format "l %.0f" erc-channel-user-limit))
+ (erc-channel-key
(if erc-show-channel-key-p
- (format "k %s" channel-key)
+ (format "k %s" erc-channel-key)
"k"))
(t ""))
(if lag (format ",lag:%.0f" lag) "")
@@ -6374,12 +5681,12 @@ format-time-message."
?a (erc-format-away-status)
?m (erc-format-channel-modes)
?n (or (erc-current-nick) "")
- ?o (erc-controls-strip channel-topic)
+ ?o (erc-controls-strip erc-channel-topic)
?p (erc-port-to-string erc-session-port)
?s (erc-format-target-and/or-server)
?t (erc-format-target)))
(process-status (cond ((and (erc-process-alive)
- (not erc-connected))
+ (not erc-server-connected))
":connecting")
((erc-process-alive)
"")
@@ -6408,7 +5715,7 @@ format-time-message."
(erc-replace-regexp-in-string
"%"
"%%"
- (propertize header 'help-echo help-echo)))))
+ (erc-propertize header 'help-echo help-echo)))))
(t (setq header-line-format header))))))
(if (featurep 'xemacs)
(redraw-modeline)
@@ -6534,9 +5841,9 @@ See also `erc-latest-version'."
All windows are opened in the current frame."
(interactive)
- (unless (boundp 'erc-process)
+ (unless (boundp 'erc-server-process)
(error "No erc-process found in current buffer"))
- (let ((bufs (erc-buffer-list nil erc-process)))
+ (let ((bufs (erc-buffer-list nil erc-server-process)))
(when bufs
(delete-other-windows)
(switch-to-buffer (car bufs))
@@ -6783,26 +6090,26 @@ or `erc-kill-buffer-hook' if any other b
(run-hooks 'erc-kill-buffer-hook)))))
(defun erc-process-alive ()
- "Return non-nil when `erc-process' is open or running."
- (and (boundp 'erc-process)
- (processp erc-process)
- (memq (process-status erc-process) '(run open))))
+ "Return non-nil when `erc-server-process' is open or running."
+ (and (boundp 'erc-server-process)
+ (processp erc-server-process)
+ (memq (process-status erc-server-process) '(run open))))
(defun erc-kill-server ()
"Sends a QUIT command to the server when the server buffer is killed.
This function should be on `erc-kill-server-hook'."
(when (erc-process-alive)
- (setq quitting t)
- (erc-send-command (format "QUIT :%s" (funcall erc-quit-reason nil)))))
+ (setq erc-server-quitting t)
+ (erc-server-send (format "QUIT :%s" (funcall erc-quit-reason nil)))))
(defun erc-kill-channel ()
"Sends a PART command to the server when the channel buffer is killed.
This function should be on `erc-kill-channel-hook'."
(when (erc-process-alive)
- (erc-send-command
- (format "PART %s :%s"
- (erc-default-target)
- (funcall erc-part-reason nil)))))
+ (let ((tgt (erc-default-target)))
+ (erc-server-send (format "PART %s :%s" tgt
+ (funcall erc-part-reason nil))
+ nil tgt))))
(provide 'erc)
@@ -6814,9 +6121,7 @@ This function should be on `erc-kill-cha
;;; erc.el ends here
;;
;; Local Variables:
-;; mode: outline-minor
;; outline-regexp: ";;+"
;; indent-tabs-mode: t
;; tab-width: 8
-;; standard-indent: 4
;; End:
1.2 +1 -1 XEmacs/packages/xemacs-packages/erc/servers.pl
Index: servers.pl
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/servers.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- servers.pl 2003/11/25 23:12:35 1.1
+++ servers.pl 2005/10/15 18:15:30 1.2
@@ -4,7 +4,7 @@
# Get the file from
http://www.mirc.co.uk/servers.ini
# TODO: We need a separate file where we can store regexp/functions
-# to match a erc-announced-server-name against a erc-networks-alist entry.
+# to match a erc-server-announced-name against a erc-networks-alist entry.
# For sanity, we'df need a lookup procedure here, and insert the
# regexp/function instead of the nil value in the erc-networks-alist.
#