diff options
| author | Karoly Lorentey | 2007-01-06 15:25:16 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2007-01-06 15:25:16 +0000 |
| commit | 191ae1cf7cd2571277635b3b8e488e773ca5c9b9 (patch) | |
| tree | e0b26e3040767dae38fb39a03b757da05088c58f /lisp/erc | |
| parent | 382707ecfb50f8c7794a7ba3d8cd9db9b6cd29d0 (diff) | |
| parent | f85c5e3b72855951b071eacb7b6e2d002c5fc4be (diff) | |
| download | emacs-191ae1cf7cd2571277635b3b8e488e773ca5c9b9.tar.gz emacs-191ae1cf7cd2571277635b3b8e488e773ca5c9b9.zip | |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-585
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-586
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-587
Update from erc--emacs--22
* emacs@sv.gnu.org/emacs--devo--0--patch-588
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-589
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-590
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-591
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-592
Diffstat (limited to 'lisp/erc')
| -rw-r--r-- | lisp/erc/ChangeLog | 78 | ||||
| -rw-r--r-- | lisp/erc/erc-backend.el | 112 | ||||
| -rw-r--r-- | lisp/erc/erc-networks.el | 8 | ||||
| -rw-r--r-- | lisp/erc/erc-services.el | 67 | ||||
| -rw-r--r-- | lisp/erc/erc.el | 40 |
5 files changed, 234 insertions, 71 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index b356f83b0b2..fa087fb513f 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog | |||
| @@ -1,3 +1,56 @@ | |||
| 1 | 2006-12-28 Michael Olson <mwolson@gnu.org> | ||
| 2 | |||
| 3 | * erc-list.el: Change header to mention that this is part of ERC, | ||
| 4 | rather than GNU Emacs. | ||
| 5 | |||
| 6 | * erc-networks.el (erc-server-alist): Add Ars OpenIRC and | ||
| 7 | LinuxChix networks. Thanks to Angelina Carlton for mentioning | ||
| 8 | them. Properly escape periods in Konfido.Net and Kewl.Org. | ||
| 9 | (erc-networks-alist): Add entries for Ars and LinuxChix, though | ||
| 10 | the latter does not actually provide an announced network name. | ||
| 11 | |||
| 12 | * erc-services.el (erc-nickserv-identify-mode): Add 'both method, | ||
| 13 | which waits for a NickServ message if the network supports it, | ||
| 14 | otherwise sends the password after connecting. | ||
| 15 | (erc-nickserv-identify-mode): Default to 'both. | ||
| 16 | (erc-nickserv-passwords): Add OFTC and Azzurra to custom options. | ||
| 17 | (erc-nickserv-alist): Indentation fix. | ||
| 18 | (erc-nickserv-identify-on-connect) | ||
| 19 | (erc-nickserv-identify-on-nick-change): Handle 'both method. | ||
| 20 | |||
| 21 | 2006-12-28 Leo <sdl.web@gmail.com> (tiny change) | ||
| 22 | |||
| 23 | * erc.el (erc-iswitchb): Wrap body in unwind-protect so that | ||
| 24 | hitting C-g does not leave iswitchb-mode on. | ||
| 25 | |||
| 26 | 2006-12-27 Michael Olson <mwolson@gnu.org> | ||
| 27 | |||
| 28 | * erc.el (erc-cmd-RECONNECT): New command that calls | ||
| 29 | erc-server-reconnect. | ||
| 30 | |||
| 31 | * erc-backend.el (erc-server-reconnect-count): New server variable | ||
| 32 | that keeps track of reconnection attempts. | ||
| 33 | (erc-server-reconnect-attempts): New option that determines the | ||
| 34 | number of reconnection attempts that ERC will make per server. | ||
| 35 | (erc-server-reconnect-timeout): New option that determines the | ||
| 36 | amount of time, in seconds, that ERC will wait between successive | ||
| 37 | reconnect attempts. | ||
| 38 | (erc-server-reconnect): New function that reestablishes the | ||
| 39 | current IRC connection. Move some commands from | ||
| 40 | erc-process-sentinel-1 here. | ||
| 41 | (erc-process-sentinel-1): If we have been disconnected, loop until | ||
| 42 | we either reconnect or run out of attempts. | ||
| 43 | (erc-server-reconnect-p): Move higher and make this a defsubst, | ||
| 44 | since I'm worried about the current buffer changing from | ||
| 45 | underneath us. Implement limit of number of reconnect attempts.. | ||
| 46 | |||
| 47 | * erc.texi (Getting Started): Update for /RECONNECT command. | ||
| 48 | |||
| 49 | 2006-12-26 Michael Olson <mwolson@gnu.org> | ||
| 50 | |||
| 51 | * erc.el (erc-open): Restore old point correctly, or at least get | ||
| 52 | closer to doing so than before. | ||
| 53 | |||
| 1 | 2006-12-13 Leo <sdl.web@gmail.com> (tiny change) | 54 | 2006-12-13 Leo <sdl.web@gmail.com> (tiny change) |
| 2 | 55 | ||
| 3 | * erc.el (erc-iswitchb): Temporarily enable iswitchb mode if it | 56 | * erc.el (erc-iswitchb): Temporarily enable iswitchb mode if it |
| @@ -38,7 +91,7 @@ | |||
| 38 | (erc-update-current-channel-member, erc-load-script): | 91 | (erc-update-current-channel-member, erc-load-script): |
| 39 | (erc-mode-line-away-status-format): Doc fixes. | 92 | (erc-mode-line-away-status-format): Doc fixes. |
| 40 | 93 | ||
| 41 | 2006-11-20 Andrea Russo <rastandy@inventati.org> | 94 | 2006-11-20 Andrea Russo <rastandy@inventati.org> (tiny change) |
| 42 | 95 | ||
| 43 | * erc-dcc.el (erc-dcc-chat-setup): Initialize `erc-input-marker' | 96 | * erc-dcc.el (erc-dcc-chat-setup): Initialize `erc-input-marker' |
| 44 | before calling `erc-display-prompt'. | 97 | before calling `erc-display-prompt'. |
| @@ -111,7 +164,7 @@ | |||
| 111 | `erc-show-my-nick' is non-nil. | 164 | `erc-show-my-nick' is non-nil. |
| 112 | (erc-compute-server): Doc fix. | 165 | (erc-compute-server): Doc fix. |
| 113 | 166 | ||
| 114 | 2006-10-01 John J Foerch <jjfoerch@earthlink.net> | 167 | 2006-10-01 John J Foerch <jjfoerch@earthlink.net> (tiny change) |
| 115 | 168 | ||
| 116 | * erc-stamp.el (erc-insert-timestamp-right): Exclude the newline | 169 | * erc-stamp.el (erc-insert-timestamp-right): Exclude the newline |
| 117 | from the erc-timestamp field. | 170 | from the erc-timestamp field. |
| @@ -121,7 +174,7 @@ | |||
| 121 | * erc-nicklist.el (erc-nicklist-insert-contents): Add missing | 174 | * erc-nicklist.el (erc-nicklist-insert-contents): Add missing |
| 122 | parenthesis. Thanks to Stephan Stahl for the report. | 175 | parenthesis. Thanks to Stephan Stahl for the report. |
| 123 | 176 | ||
| 124 | 2006-09-10 Eric Hanchrow <offby1@blarg.net> | 177 | 2006-09-10 Eric Hanchrow <offby1@blarg.net> (tiny change) |
| 125 | 178 | ||
| 126 | * erc.el (erc-cmd-IGNORE): Prompt user if this might be a regexp | 179 | * erc.el (erc-cmd-IGNORE): Prompt user if this might be a regexp |
| 127 | instead of a single user. | 180 | instead of a single user. |
| @@ -230,6 +283,13 @@ | |||
| 230 | 283 | ||
| 231 | * NEWS: Added note about these changes. | 284 | * NEWS: Added note about these changes. |
| 232 | 285 | ||
| 286 | 2006-08-20 Diane Murray <disumu@x3y2z1.net> | ||
| 287 | |||
| 288 | * erc-backend.el (erc-process-sentinel-1): Doc fix. Let | ||
| 289 | `erc-server-reconnect-p' check all condition cases. | ||
| 290 | (erc-server-reconnect-p): Moved rest of checks from | ||
| 291 | `erc-process-sentinel-1' to here. Now takes an argument, EVENT. | ||
| 292 | |||
| 233 | 2006-08-21 Diane Murray <disumu@x3y2z1.net> | 293 | 2006-08-21 Diane Murray <disumu@x3y2z1.net> |
| 234 | 294 | ||
| 235 | * erc-track.el (erc-track-mode-line-mouse-face): New variable. | 295 | * erc-track.el (erc-track-mode-line-mouse-face): New variable. |
| @@ -242,6 +302,18 @@ | |||
| 242 | (erc-menu-definition): Name the menu "ERC" instead of "IRC" to | 302 | (erc-menu-definition): Name the menu "ERC" instead of "IRC" to |
| 243 | avoid confusion with rcirc and other clients. | 303 | avoid confusion with rcirc and other clients. |
| 244 | 304 | ||
| 305 | * erc-backend.el (erc-server-banned): New variable. | ||
| 306 | (erc-server-connect): Set `erc-server-banned' to nil. | ||
| 307 | (erc-process-sentinel-1): Use `erc-server-reconnect-p'. | ||
| 308 | (erc-server-reconnect-p): New function. Return non-nil if the | ||
| 309 | user wants automatic reconnects and if the user has not been | ||
| 310 | banned from the server. This should fix a bug where ERC gets into | ||
| 311 | a loop trying to reconnect with no way to stop it when the user is | ||
| 312 | denied access to the server due to a server ban. It might also | ||
| 313 | help when Tor users are blocked from freenode if freenode servers | ||
| 314 | send the 465 message before disconnecting. | ||
| 315 | (465): Handle "banned from server" error notices. | ||
| 316 | |||
| 245 | 2006-08-13 Romain Francoise <romain@orebokech.com> | 317 | 2006-08-13 Romain Francoise <romain@orebokech.com> |
| 246 | 318 | ||
| 247 | * erc-match.el (erc-log-matches-make-buffer): End `y-or-n-p' | 319 | * erc-match.el (erc-log-matches-make-buffer): End `y-or-n-p' |
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 82934f92218..c589ae282a6 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el | |||
| @@ -179,10 +179,18 @@ WALLCHOPS - supports sending messages to all operators in a channel") | |||
| 179 | This variable is buffer-local.") | 179 | This variable is buffer-local.") |
| 180 | (make-variable-buffer-local 'erc-server-connected) | 180 | (make-variable-buffer-local 'erc-server-connected) |
| 181 | 181 | ||
| 182 | (defvar erc-server-reconnect-count 0 | ||
| 183 | "Number of times we have failed to reconnect to the current server.") | ||
| 184 | (make-variable-buffer-local 'erc-server-reconnect-count) | ||
| 185 | |||
| 182 | (defvar erc-server-quitting nil | 186 | (defvar erc-server-quitting nil |
| 183 | "Non-nil if the user requests a quit.") | 187 | "Non-nil if the user requests a quit.") |
| 184 | (make-variable-buffer-local 'erc-server-quitting) | 188 | (make-variable-buffer-local 'erc-server-quitting) |
| 185 | 189 | ||
| 190 | (defvar erc-server-banned nil | ||
| 191 | "Non-nil if the user is denied access because of a server ban.") | ||
| 192 | (make-variable-buffer-local 'erc-server-banned) | ||
| 193 | |||
| 186 | (defvar erc-server-lines-sent nil | 194 | (defvar erc-server-lines-sent nil |
| 187 | "Line counter.") | 195 | "Line counter.") |
| 188 | (make-variable-buffer-local 'erc-server-lines-sent) | 196 | (make-variable-buffer-local 'erc-server-lines-sent) |
| @@ -259,6 +267,23 @@ Reconnection will happen automatically for any unexpected disconnection." | |||
| 259 | :group 'erc-server | 267 | :group 'erc-server |
| 260 | :type 'boolean) | 268 | :type 'boolean) |
| 261 | 269 | ||
| 270 | (defcustom erc-server-reconnect-attempts 2 | ||
| 271 | "The number of times that ERC will attempt to reestablish a | ||
| 272 | broken connection, or t to always attempt to reconnect. | ||
| 273 | |||
| 274 | This only has an effect if `erc-server-auto-reconnect' is non-nil." | ||
| 275 | :group 'erc-server | ||
| 276 | :type '(choice (const :tag "Always reconnect" t) | ||
| 277 | integer)) | ||
| 278 | |||
| 279 | (defcustom erc-server-reconnect-timeout 1 | ||
| 280 | "The amount of time, in seconds, that ERC will wait between | ||
| 281 | successive reconnect attempts. | ||
| 282 | |||
| 283 | If a key is pressed while ERC is waiting, it will stop waiting." | ||
| 284 | :group 'erc-server | ||
| 285 | :type 'number) | ||
| 286 | |||
| 262 | (defcustom erc-split-line-length 440 | 287 | (defcustom erc-split-line-length 440 |
| 263 | "*The maximum length of a single message. | 288 | "*The maximum length of a single message. |
| 264 | If a message exceeds this size, it is broken into multiple ones. | 289 | If a message exceeds this size, it is broken into multiple ones. |
| @@ -434,6 +459,7 @@ We will store server variables in the current buffer." | |||
| 434 | (message "%s...done" msg)) | 459 | (message "%s...done" msg)) |
| 435 | ;; Misc server variables | 460 | ;; Misc server variables |
| 436 | (setq erc-server-quitting nil) | 461 | (setq erc-server-quitting nil) |
| 462 | (setq erc-server-banned nil) | ||
| 437 | (setq erc-server-last-sent-time (erc-current-time)) | 463 | (setq erc-server-last-sent-time (erc-current-time)) |
| 438 | (setq erc-server-last-ping-time (erc-current-time)) | 464 | (setq erc-server-last-ping-time (erc-current-time)) |
| 439 | (setq erc-server-lines-sent 0) | 465 | (setq erc-server-lines-sent 0) |
| @@ -457,6 +483,21 @@ We will store server variables in the current buffer." | |||
| 457 | "Opening connection..\n") | 483 | "Opening connection..\n") |
| 458 | (erc-login))) | 484 | (erc-login))) |
| 459 | 485 | ||
| 486 | (defun erc-server-reconnect () | ||
| 487 | "Reestablish the current IRC connection. | ||
| 488 | Make sure you are in an ERC buffer when running this." | ||
| 489 | (let ((server (erc-server-buffer))) | ||
| 490 | (unless (and server | ||
| 491 | (buffer-live-p server)) | ||
| 492 | (error "Couldn't switch to server buffer")) | ||
| 493 | (with-current-buffer server | ||
| 494 | (erc-update-mode-line) | ||
| 495 | (erc-set-active-buffer (current-buffer)) | ||
| 496 | (setq erc-server-last-sent-time 0) | ||
| 497 | (setq erc-server-lines-sent 0) | ||
| 498 | (erc-open erc-session-server erc-session-port erc-server-current-nick | ||
| 499 | erc-session-user-full-name t erc-session-password)))) | ||
| 500 | |||
| 460 | (defun erc-server-filter-function (process string) | 501 | (defun erc-server-filter-function (process string) |
| 461 | "The process filter for the ERC server." | 502 | "The process filter for the ERC server." |
| 462 | (with-current-buffer (process-buffer process) | 503 | (with-current-buffer (process-buffer process) |
| @@ -485,11 +526,24 @@ We will store server variables in the current buffer." | |||
| 485 | (match-end 0)))) | 526 | (match-end 0)))) |
| 486 | (erc-parse-server-response process line))))))) | 527 | (erc-parse-server-response process line))))))) |
| 487 | 528 | ||
| 529 | (defsubst erc-server-reconnect-p (event) | ||
| 530 | "Return non-nil if ERC should attempt to reconnect automatically. | ||
| 531 | EVENT is the message received from the closed connection process." | ||
| 532 | (and erc-server-auto-reconnect | ||
| 533 | (not erc-server-banned) | ||
| 534 | ;; make sure we don't infinitely try to reconnect, unless the | ||
| 535 | ;; user wants that | ||
| 536 | (or (eq erc-server-reconnect-attempts t) | ||
| 537 | (and (integerp erc-server-reconnect-attempts) | ||
| 538 | (< erc-server-reconnect-count erc-server-reconnect-attempts))) | ||
| 539 | (not (string-match "^deleted" event)) | ||
| 540 | ;; open-network-stream-nowait error for connection refused | ||
| 541 | (not (string-match "^failed with code 111" event)))) | ||
| 542 | |||
| 488 | (defun erc-process-sentinel-1 (event) | 543 | (defun erc-process-sentinel-1 (event) |
| 489 | "This will be called when erc-process-sentinel has decided that we | 544 | "Called when `erc-process-sentinel' has decided that we're disconnecting. |
| 490 | are going to quit. Determine whether user has quit or whether erc has | 545 | Determine whether user has quit or whether erc has been terminated. |
| 491 | been terminated. Conditionally try to reconnect and take appropriate | 546 | Conditionally try to reconnect and take appropriate action." |
| 492 | action." | ||
| 493 | (if erc-server-quitting | 547 | (if erc-server-quitting |
| 494 | ;; normal quit | 548 | ;; normal quit |
| 495 | (progn | 549 | (progn |
| @@ -498,25 +552,26 @@ action." | |||
| 498 | (set-buffer-modified-p nil) | 552 | (set-buffer-modified-p nil) |
| 499 | (kill-buffer (current-buffer)))) | 553 | (kill-buffer (current-buffer)))) |
| 500 | ;; unexpected disconnect | 554 | ;; unexpected disconnect |
| 501 | (erc-display-message nil 'error (current-buffer) | 555 | (let ((again t)) |
| 502 | (if erc-server-auto-reconnect | 556 | (while again |
| 503 | 'disconnected | 557 | (setq again nil) |
| 504 | 'disconnected-noreconnect)) | 558 | (erc-display-message nil 'error (current-buffer) |
| 505 | (erc-update-mode-line) | 559 | (if (erc-server-reconnect-p event) |
| 506 | (erc-set-active-buffer (current-buffer)) | 560 | 'disconnected |
| 507 | (setq erc-server-last-sent-time 0) | 561 | 'disconnected-noreconnect)) |
| 508 | (setq erc-server-lines-sent 0) | 562 | (if (erc-server-reconnect-p event) |
| 509 | (if (and erc-server-auto-reconnect | 563 | (condition-case err |
| 510 | (not (string-match "^deleted" event)) | 564 | (progn |
| 511 | ;; open-network-stream-nowait error for connection refused | 565 | (erc-server-reconnect) |
| 512 | (not (string-match "^failed with code 111" event))) | 566 | (setq erc-server-reconnect-count 0)) |
| 513 | ;; Yuck, this should perhaps funcall | 567 | (error (when (integerp erc-server-reconnect-attempts) |
| 514 | ;; erc-server-reconnect-function with no args | 568 | (setq erc-server-reconnect-count |
| 515 | (erc-open erc-session-server erc-session-port erc-server-current-nick | 569 | (1+ erc-server-reconnect-count)) |
| 516 | erc-session-user-full-name t erc-session-password) | 570 | (sit-for erc-server-reconnect-timeout) |
| 517 | ;; terminate, do not reconnect | 571 | (setq again t)))) |
| 518 | (erc-display-message nil 'error (current-buffer) | 572 | ;; terminate, do not reconnect |
| 519 | 'terminated ?e event)))) | 573 | (erc-display-message nil 'error (current-buffer) |
| 574 | 'terminated ?e event)))))) | ||
| 520 | 575 | ||
| 521 | (defun erc-process-sentinel (cproc event) | 576 | (defun erc-process-sentinel (cproc event) |
| 522 | "Sentinel function for ERC process." | 577 | "Sentinel function for ERC process." |
| @@ -1708,6 +1763,14 @@ See `erc-display-server-message'." nil | |||
| 1708 | ?c (second (erc-response.command-args parsed)) | 1763 | ?c (second (erc-response.command-args parsed)) |
| 1709 | ?m (erc-response.contents parsed))) | 1764 | ?m (erc-response.contents parsed))) |
| 1710 | 1765 | ||
| 1766 | (define-erc-response-handler (465) | ||
| 1767 | "You are banned from this server." nil | ||
| 1768 | (setq erc-server-banned t) | ||
| 1769 | ;; show the server's message, as a reason might be provided | ||
| 1770 | (erc-display-error-notice | ||
| 1771 | parsed | ||
| 1772 | (erc-response.contents parsed))) | ||
| 1773 | |||
| 1711 | (define-erc-response-handler (474) | 1774 | (define-erc-response-handler (474) |
| 1712 | "Banned from channel errors" nil | 1775 | "Banned from channel errors" nil |
| 1713 | (erc-display-message parsed '(notice error) nil | 1776 | (erc-display-message parsed '(notice error) nil |
| @@ -1741,7 +1804,7 @@ See `erc-display-server-message'." nil | |||
| 1741 | (erc-display-message parsed '(error notice) 'active 's482 | 1804 | (erc-display-message parsed '(error notice) 'active 's482 |
| 1742 | ?c channel ?m message))) | 1805 | ?c channel ?m message))) |
| 1743 | 1806 | ||
| 1744 | (define-erc-response-handler (431 445 446 451 462 463 464 465 481 483 484 485 | 1807 | (define-erc-response-handler (431 445 446 451 462 463 464 481 483 484 485 |
| 1745 | 491 501 502) | 1808 | 491 501 502) |
| 1746 | ;; 431 - No nickname given | 1809 | ;; 431 - No nickname given |
| 1747 | ;; 445 - SUMMON has been disabled | 1810 | ;; 445 - SUMMON has been disabled |
| @@ -1750,7 +1813,6 @@ See `erc-display-server-message'." nil | |||
| 1750 | ;; 462 - Unauthorized command (already registered) | 1813 | ;; 462 - Unauthorized command (already registered) |
| 1751 | ;; 463 - Your host isn't among the privileged | 1814 | ;; 463 - Your host isn't among the privileged |
| 1752 | ;; 464 - Password incorrect | 1815 | ;; 464 - Password incorrect |
| 1753 | ;; 465 - You are banned from this server | ||
| 1754 | ;; 481 - Need IRCop privileges | 1816 | ;; 481 - Need IRCop privileges |
| 1755 | ;; 483 - You can't kill a server! | 1817 | ;; 483 - You can't kill a server! |
| 1756 | ;; 484 - Your connection is restricted! | 1818 | ;; 484 - Your connection is restricted! |
diff --git a/lisp/erc/erc-networks.el b/lisp/erc/erc-networks.el index 99aba31c3d4..034950e665f 100644 --- a/lisp/erc/erc-networks.el +++ b/lisp/erc/erc-networks.el | |||
| @@ -64,6 +64,7 @@ | |||
| 64 | ("AngelEyez: Random server" AngelEyez "irc.angeleyez.net" ((6666 7000))) | 64 | ("AngelEyez: Random server" AngelEyez "irc.angeleyez.net" ((6666 7000))) |
| 65 | ("AnotherNet: Random server" Anothernet "irc.another.net" (6667 7000 )) | 65 | ("AnotherNet: Random server" Anothernet "irc.another.net" (6667 7000 )) |
| 66 | ("ArabChat: Random server" ArabChat "irc.arabchat.org" ((6660 6667))) | 66 | ("ArabChat: Random server" ArabChat "irc.arabchat.org" ((6660 6667))) |
| 67 | ("Ars-OpenIRC: Random server" Ars "irc.arstechnica.com" 6667) | ||
| 67 | ("AsiaTalk: Random server" AsiaTalk "irc.asiatalk.org" ((6667 6669) 7000 )) | 68 | ("AsiaTalk: Random server" AsiaTalk "irc.asiatalk.org" ((6667 6669) 7000 )) |
| 68 | ("AstroLink: Random server" AstroLink "irc.astrolink.org" ((6660 6667))) | 69 | ("AstroLink: Random server" AstroLink "irc.astrolink.org" ((6660 6667))) |
| 69 | ("Asylumnet: Random server" Asylumnet "irc.asylum-net.org" ((6661 6669) 7000 7777 )) | 70 | ("Asylumnet: Random server" Asylumnet "irc.asylum-net.org" ((6661 6669) 7000 7777 )) |
| @@ -280,12 +281,12 @@ | |||
| 280 | ("K0wNet: Random server" K0wNet "irc.k0w.net" ((6660 6669))) | 281 | ("K0wNet: Random server" K0wNet "irc.k0w.net" ((6660 6669))) |
| 281 | ("KDFSnet: Random server" KDFSnet "irc.kdfs.net" ((6667 6669))) | 282 | ("KDFSnet: Random server" KDFSnet "irc.kdfs.net" ((6667 6669))) |
| 282 | ("Kemik: Random server" Kemik "irc.kemik.net" 6667) | 283 | ("Kemik: Random server" Kemik "irc.kemik.net" 6667) |
| 283 | ("Kewl.Org: Random server" Kewl.Org "irc.kewl.org" (6667 7000 )) | 284 | ("Kewl.Org: Random server" Kewl\.Org "irc.kewl.org" (6667 7000 )) |
| 284 | ("Kickchat: Random server" Kickchat "irc.kickchat.com" ((6660 6669) 7000 )) | 285 | ("Kickchat: Random server" Kickchat "irc.kickchat.com" ((6660 6669) 7000 )) |
| 285 | ("Kidsworld: Random server" KidsWorld "irc.kidsworld.org" ((6666 6669))) | 286 | ("Kidsworld: Random server" KidsWorld "irc.kidsworld.org" ((6666 6669))) |
| 286 | ("Knightnet: AF, ZA, Durban" Knightnet "orc.dbn.za.knightnet.net" (6667 5555 )) | 287 | ("Knightnet: AF, ZA, Durban" Knightnet "orc.dbn.za.knightnet.net" (6667 5555 )) |
| 287 | ("Knightnet: US, CA, Goldengate" Knightnet "goldengate.ca.us.knightnet.net" (6667 5555 )) | 288 | ("Knightnet: US, CA, Goldengate" Knightnet "goldengate.ca.us.knightnet.net" (6667 5555 )) |
| 288 | ("Konfido.Net: Random server" Konfido.Net "irc.konfido.net" 6667) | 289 | ("Konfido.Net: Random server" Konfido\.Net "irc.konfido.net" 6667) |
| 289 | ("KreyNet: Random server" Kreynet "irc.krey.net" 6667) | 290 | ("KreyNet: Random server" Kreynet "irc.krey.net" 6667) |
| 290 | ("Krono: Random server" Krono "irc.krono.net" ((6660 6669) 7000 )) | 291 | ("Krono: Random server" Krono "irc.krono.net" ((6660 6669) 7000 )) |
| 291 | ("Krushnet: Random server" Krushnet "irc.krushnet.org" 6667) | 292 | ("Krushnet: Random server" Krushnet "irc.krushnet.org" 6667) |
| @@ -294,6 +295,7 @@ | |||
| 294 | ("LagNet: AF, ZA, Johannesburg" LagNet "mystery.lagnet.org.za" 6667) | 295 | ("LagNet: AF, ZA, Johannesburg" LagNet "mystery.lagnet.org.za" 6667) |
| 295 | ("Librenet: Random server" Librenet "irc.librenet.net" 6667) | 296 | ("Librenet: Random server" Librenet "irc.librenet.net" 6667) |
| 296 | ("LinkNet: Random server" LinkNet "irc.link-net.org" ((6667 6669))) | 297 | ("LinkNet: Random server" LinkNet "irc.link-net.org" ((6667 6669))) |
| 298 | ("LinuxChix: Random server" LinuxChix "irc.linuxchix.org" 6667) | ||
| 297 | ("Liquidized: Random server" Liquidized "irc.liquidized.net" (6667 7000 )) | 299 | ("Liquidized: Random server" Liquidized "irc.liquidized.net" (6667 7000 )) |
| 298 | ("M-IRC: Random server" M-IRC "irc.m-sys.org" ((6667 6669))) | 300 | ("M-IRC: Random server" M-IRC "irc.m-sys.org" ((6667 6669))) |
| 299 | ("MagicStar: Random server" MagicStar "irc.magicstar.net" 6667) | 301 | ("MagicStar: Random server" MagicStar "irc.magicstar.net" 6667) |
| @@ -457,6 +459,7 @@ PORTS is either a number, a list of numbers, or a list of port ranges." | |||
| 457 | (AngelEyez "angeleyez.net") | 459 | (AngelEyez "angeleyez.net") |
| 458 | (Anothernet "another.net") | 460 | (Anothernet "another.net") |
| 459 | (ArabChat "arabchat.org") | 461 | (ArabChat "arabchat.org") |
| 462 | (Ars "arstechnica.com") | ||
| 460 | (AsiaTalk "asiatalk.org") | 463 | (AsiaTalk "asiatalk.org") |
| 461 | (AstroLink "astrolink.org") | 464 | (AstroLink "astrolink.org") |
| 462 | (Asylumnet "asylumnet.org") | 465 | (Asylumnet "asylumnet.org") |
| @@ -586,6 +589,7 @@ PORTS is either a number, a list of numbers, or a list of port ranges." | |||
| 586 | (LagNet "lagnet.org.za") | 589 | (LagNet "lagnet.org.za") |
| 587 | (Librenet "librenet.net") | 590 | (Librenet "librenet.net") |
| 588 | (LinkNet "link-net.org") | 591 | (LinkNet "link-net.org") |
| 592 | (LinuxChix "cats\.meow\.at\\|linuxchix\.org") | ||
| 589 | (Liquidized "liquidized.net") | 593 | (Liquidized "liquidized.net") |
| 590 | (M-IRC "m-sys.org") | 594 | (M-IRC "m-sys.org") |
| 591 | (MagicStar "magicstar.net") | 595 | (MagicStar "magicstar.net") |
diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index c8bac7fe45c..b93317e6124 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el | |||
| @@ -94,7 +94,7 @@ communication with those Services." | |||
| 94 | (interactive | 94 | (interactive |
| 95 | (list (intern (completing-read | 95 | (list (intern (completing-read |
| 96 | "Choose Nickserv identify mode (RET to disable): " | 96 | "Choose Nickserv identify mode (RET to disable): " |
| 97 | '(("autodetect") ("nick-change")) nil t)))) | 97 | '(("autodetect") ("nick-change") ("both")) nil t)))) |
| 98 | (cond ((eq mode 'autodetect) | 98 | (cond ((eq mode 'autodetect) |
| 99 | (setq erc-nickserv-identify-mode 'autodetect) | 99 | (setq erc-nickserv-identify-mode 'autodetect) |
| 100 | (add-hook 'erc-server-NOTICE-functions | 100 | (add-hook 'erc-server-NOTICE-functions |
| @@ -111,6 +111,14 @@ communication with those Services." | |||
| 111 | 'erc-nickserv-identify-on-nick-change) | 111 | 'erc-nickserv-identify-on-nick-change) |
| 112 | (remove-hook 'erc-server-NOTICE-functions | 112 | (remove-hook 'erc-server-NOTICE-functions |
| 113 | 'erc-nickserv-identify-autodetect)) | 113 | 'erc-nickserv-identify-autodetect)) |
| 114 | ((eq mode 'both) | ||
| 115 | (setq erc-nickserv-identify-mode 'both) | ||
| 116 | (add-hook 'erc-server-NOTICE-functions | ||
| 117 | 'erc-nickserv-identify-autodetect) | ||
| 118 | (add-hook 'erc-after-connect | ||
| 119 | 'erc-nickserv-identify-on-connect) | ||
| 120 | (add-hook 'erc-nick-changed-functions | ||
| 121 | 'erc-nickserv-identify-on-nick-change)) | ||
| 114 | (t | 122 | (t |
| 115 | (setq erc-nickserv-identify-mode nil) | 123 | (setq erc-nickserv-identify-mode nil) |
| 116 | (remove-hook 'erc-server-NOTICE-functions | 124 | (remove-hook 'erc-server-NOTICE-functions |
| @@ -120,22 +128,25 @@ communication with those Services." | |||
| 120 | (remove-hook 'erc-nick-changed-functions | 128 | (remove-hook 'erc-nick-changed-functions |
| 121 | 'erc-nickserv-identify-on-nick-change)))) | 129 | 'erc-nickserv-identify-on-nick-change)))) |
| 122 | 130 | ||
| 123 | (defcustom erc-nickserv-identify-mode 'autodetect | 131 | (defcustom erc-nickserv-identify-mode 'both |
| 124 | "The mode which is used when identifying to Nickserv. | 132 | "The mode which is used when identifying to Nickserv. |
| 125 | 133 | ||
| 126 | Possible settings are:. | 134 | Possible settings are:. |
| 127 | 135 | ||
| 128 | 'autodetect - Identify when the real Nickserv sends an identify request. | 136 | 'autodetect - Identify when the real Nickserv sends an identify request. |
| 129 | 'nick-change - Identify when you change your nickname. | 137 | 'nick-change - Identify when you change your nickname. |
| 138 | 'both - Do the former if the network supports it, otherwise do the | ||
| 139 | latter. | ||
| 130 | nil - Disables automatic Nickserv identification. | 140 | nil - Disables automatic Nickserv identification. |
| 131 | 141 | ||
| 132 | You can also use M-x erc-nickserv-identify-mode to change modes." | 142 | You can also use M-x erc-nickserv-identify-mode to change modes." |
| 133 | :group 'erc-services | 143 | :group 'erc-services |
| 134 | :type '(choice (const autodetect) | 144 | :type '(choice (const autodetect) |
| 135 | (const nick-change) | 145 | (const nick-change) |
| 146 | (const both) | ||
| 136 | (const nil)) | 147 | (const nil)) |
| 137 | :set (lambda (sym val) | 148 | :set (lambda (sym val) |
| 138 | (set-default sym val) | 149 | (set sym val) |
| 139 | (erc-nickserv-identify-mode val))) | 150 | (erc-nickserv-identify-mode val))) |
| 140 | 151 | ||
| 141 | (defcustom erc-prompt-for-nickserv-password t | 152 | (defcustom erc-prompt-for-nickserv-password t |
| @@ -156,12 +167,14 @@ Example of use: | |||
| 156 | (list :tag "Network" | 167 | (list :tag "Network" |
| 157 | (choice :tag "Network name" | 168 | (choice :tag "Network name" |
| 158 | (const freenode) | 169 | (const freenode) |
| 170 | (const OFTC) | ||
| 159 | (const DALnet) | 171 | (const DALnet) |
| 160 | (const GalaxyNet) | 172 | (const GalaxyNet) |
| 161 | (const SlashNET) | 173 | (const SlashNET) |
| 162 | (const BRASnet) | 174 | (const BRASnet) |
| 163 | (const iip) | 175 | (const iip) |
| 164 | (const Austnet) | 176 | (const Austnet) |
| 177 | (const Azzurra) | ||
| 165 | (symbol :tag "Network name")) | 178 | (symbol :tag "Network name")) |
| 166 | (repeat :tag "Nickname and password" | 179 | (repeat :tag "Nickname and password" |
| 167 | (cons :tag "Identity" | 180 | (cons :tag "Identity" |
| @@ -209,24 +222,24 @@ Example of use: | |||
| 209 | "IDENTIFY" | 222 | "IDENTIFY" |
| 210 | nil | 223 | nil |
| 211 | "") | 224 | "") |
| 212 | (Austnet | 225 | (Austnet |
| 213 | "NickOP!service@austnet.org" | 226 | "NickOP!service@austnet.org" |
| 214 | "/msg\\s-NickOP@austnet.org\\s-identify\\s-<password>" | 227 | "/msg\\s-NickOP@austnet.org\\s-identify\\s-<password>" |
| 215 | "nickop@austnet.org" | 228 | "nickop@austnet.org" |
| 216 | "identify" | 229 | "identify" |
| 217 | nil) | 230 | nil) |
| 218 | (Azzurra | 231 | (Azzurra |
| 219 | "NickServ!service@azzurra.org" | 232 | "NickServ!service@azzurra.org" |
| 220 | "/ns\\s-IDENTIFY\\s-password" | 233 | "/ns\\s-IDENTIFY\\s-password" |
| 221 | "NickServ" | 234 | "NickServ" |
| 222 | "IDENTIFY" | 235 | "IDENTIFY" |
| 223 | nil) | 236 | nil) |
| 224 | (OFTC | 237 | (OFTC |
| 225 | "NickServ!services@services.oftc.net" | 238 | "NickServ!services@services.oftc.net" |
| 226 | "/msg\\s-NickServ\\s-IDENTIFY\\s-\^_password" | 239 | "/msg\\s-NickServ\\s-IDENTIFY\\s-\^_password" |
| 227 | "NickServ" | 240 | "NickServ" |
| 228 | "IDENTIFY" | 241 | "IDENTIFY" |
| 229 | nil)) | 242 | nil)) |
| 230 | "Alist of NickServer details, sorted by network. | 243 | "Alist of NickServer details, sorted by network. |
| 231 | Every element in the list has the form | 244 | Every element in the list has the form |
| 232 | \(SYMBOL NICKSERV REGEXP NICK KEYWORD USE-CURRENT ANSWER) | 245 | \(SYMBOL NICKSERV REGEXP NICK KEYWORD USE-CURRENT ANSWER) |
| @@ -279,14 +292,18 @@ password for this nickname, otherwise try to send it automatically." | |||
| 279 | 292 | ||
| 280 | (defun erc-nickserv-identify-on-connect (server nick) | 293 | (defun erc-nickserv-identify-on-connect (server nick) |
| 281 | "Identify to Nickserv after the connection to the server is established." | 294 | "Identify to Nickserv after the connection to the server is established." |
| 282 | (unless (and (null erc-nickserv-passwords) | 295 | (unless (or (and (null erc-nickserv-passwords) |
| 283 | (null erc-prompt-for-nickserv-password)) | 296 | (null erc-prompt-for-nickserv-password)) |
| 297 | (and (eq erc-nickserv-identify-mode 'both) | ||
| 298 | (nth 2 (assoc (erc-network) erc-nickserv-alist)))) | ||
| 284 | (erc-nickserv-call-identify-function nick))) | 299 | (erc-nickserv-call-identify-function nick))) |
| 285 | 300 | ||
| 286 | (defun erc-nickserv-identify-on-nick-change (nick old-nick) | 301 | (defun erc-nickserv-identify-on-nick-change (nick old-nick) |
| 287 | "Identify to Nickserv whenever your nick changes." | 302 | "Identify to Nickserv whenever your nick changes." |
| 288 | (unless (and (null erc-nickserv-passwords) | 303 | (unless (or (and (null erc-nickserv-passwords) |
| 289 | (null erc-prompt-for-nickserv-password)) | 304 | (null erc-prompt-for-nickserv-password)) |
| 305 | (and (eq erc-nickserv-identify-mode 'both) | ||
| 306 | (nth 2 (assoc (erc-network) erc-nickserv-alist)))) | ||
| 290 | (erc-nickserv-call-identify-function nick))) | 307 | (erc-nickserv-call-identify-function nick))) |
| 291 | 308 | ||
| 292 | (defun erc-nickserv-call-identify-function (nickname) | 309 | (defun erc-nickserv-call-identify-function (nickname) |
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 7de2828b86d..427dd178383 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el | |||
| @@ -1672,21 +1672,22 @@ needs to be active for this function to work." | |||
| 1672 | (require 'iswitchb)) | 1672 | (require 'iswitchb)) |
| 1673 | (let ((enabled iswitchb-mode)) | 1673 | (let ((enabled iswitchb-mode)) |
| 1674 | (or enabled (iswitchb-mode 1)) | 1674 | (or enabled (iswitchb-mode 1)) |
| 1675 | (let ((iswitchb-make-buflist-hook | 1675 | (unwind-protect |
| 1676 | (lambda () | 1676 | (let ((iswitchb-make-buflist-hook |
| 1677 | (setq iswitchb-temp-buflist | 1677 | (lambda () |
| 1678 | (mapcar 'buffer-name | 1678 | (setq iswitchb-temp-buflist |
| 1679 | (erc-buffer-list | 1679 | (mapcar 'buffer-name |
| 1680 | nil | 1680 | (erc-buffer-list |
| 1681 | (when arg erc-server-process))))))) | 1681 | nil |
| 1682 | (switch-to-buffer | 1682 | (when arg erc-server-process))))))) |
| 1683 | (iswitchb-read-buffer | 1683 | (switch-to-buffer |
| 1684 | "Switch-to: " | 1684 | (iswitchb-read-buffer |
| 1685 | (if (boundp 'erc-modified-channels-alist) | 1685 | "Switch-to: " |
| 1686 | (buffer-name (caar (last erc-modified-channels-alist))) | 1686 | (if (boundp 'erc-modified-channels-alist) |
| 1687 | nil) | 1687 | (buffer-name (caar (last erc-modified-channels-alist))) |
| 1688 | t))) | 1688 | nil) |
| 1689 | (or enabled (iswitchb-mode -1)))) | 1689 | t))) |
| 1690 | (or enabled (iswitchb-mode -1))))) | ||
| 1690 | 1691 | ||
| 1691 | (defun erc-channel-list (proc) | 1692 | (defun erc-channel-list (proc) |
| 1692 | "Return a list of channel buffers. | 1693 | "Return a list of channel buffers. |
| @@ -1888,10 +1889,11 @@ Returns the buffer for the given server or channel." | |||
| 1888 | (connected-p (unless connect erc-server-connected)) | 1889 | (connected-p (unless connect erc-server-connected)) |
| 1889 | (buffer (erc-get-buffer-create server port channel)) | 1890 | (buffer (erc-get-buffer-create server port channel)) |
| 1890 | (old-buffer (current-buffer)) | 1891 | (old-buffer (current-buffer)) |
| 1891 | (old-point (point)) | 1892 | old-point |
| 1892 | continued-session) | 1893 | continued-session) |
| 1893 | (erc-update-modules) | 1894 | (erc-update-modules) |
| 1894 | (set-buffer buffer) | 1895 | (set-buffer buffer) |
| 1896 | (setq old-point (point)) | ||
| 1895 | (erc-mode) | 1897 | (erc-mode) |
| 1896 | (setq erc-server-announced-name server-announced-name) | 1898 | (setq erc-server-announced-name server-announced-name) |
| 1897 | (setq erc-server-connected connected-p) | 1899 | (setq erc-server-connected connected-p) |
| @@ -3165,6 +3167,12 @@ the message given by REASON." | |||
| 3165 | (defalias 'erc-cmd-GQ 'erc-cmd-GQUIT) | 3167 | (defalias 'erc-cmd-GQ 'erc-cmd-GQUIT) |
| 3166 | (put 'erc-cmd-GQUIT 'do-not-parse-args t) | 3168 | (put 'erc-cmd-GQUIT 'do-not-parse-args t) |
| 3167 | 3169 | ||
| 3170 | (defun erc-cmd-RECONNECT () | ||
| 3171 | "Try to reconnect to the current IRC server." | ||
| 3172 | (setq erc-server-reconnect-count 0) | ||
| 3173 | (erc-server-reconnect) | ||
| 3174 | t) | ||
| 3175 | |||
| 3168 | (defun erc-cmd-SERVER (server) | 3176 | (defun erc-cmd-SERVER (server) |
| 3169 | "Connect to SERVER, leaving existing connection intact." | 3177 | "Connect to SERVER, leaving existing connection intact." |
| 3170 | (erc-log (format "cmd: SERVER: %s" server)) | 3178 | (erc-log (format "cmd: SERVER: %s" server)) |