aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/erc
diff options
context:
space:
mode:
authorMiles Bader <[email protected]>2007-01-05 02:09:07 +0000
committerMiles Bader <[email protected]>2007-01-05 02:09:07 +0000
commit10dc9f9eba4636988cc3fee62abc8c93ca402fa0 (patch)
tree7f4ccfb2665b0a3e9b0b03d27b912e274f34a2c7 /lisp/erc
parenta0583738af211e7859bec6d355c9a269da96b351 (diff)
Update from erc--emacs--22
Highlights: - New /RECONNECT command. - Improve default method for auto-identify to nickserv. - Fix another erc-iswitchb bug. - Fix reconnect lockup (defaulting to twice before giving up). - Fix reconnect on ban. Revision: [email protected]/emacs--devo--0--patch-587 Creator: Michael Olson <[email protected]>
Diffstat (limited to 'lisp/erc')
-rw-r--r--lisp/erc/ChangeLog78
-rw-r--r--lisp/erc/erc-backend.el112
-rw-r--r--lisp/erc/erc-networks.el8
-rw-r--r--lisp/erc/erc-services.el67
-rw-r--r--lisp/erc/erc.el40
5 files changed, 234 insertions, 71 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index b356f83b0b..fa087fb513 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,56 @@
+2006-12-28 Michael Olson <[email protected]>
+
+ * erc-list.el: Change header to mention that this is part of ERC,
+ rather than GNU Emacs.
+
+ * erc-networks.el (erc-server-alist): Add Ars OpenIRC and
+ LinuxChix networks. Thanks to Angelina Carlton for mentioning
+ them. Properly escape periods in Konfido.Net and Kewl.Org.
+ (erc-networks-alist): Add entries for Ars and LinuxChix, though
+ the latter does not actually provide an announced network name.
+
+ * erc-services.el (erc-nickserv-identify-mode): Add 'both method,
+ which waits for a NickServ message if the network supports it,
+ otherwise sends the password after connecting.
+ (erc-nickserv-identify-mode): Default to 'both.
+ (erc-nickserv-passwords): Add OFTC and Azzurra to custom options.
+ (erc-nickserv-alist): Indentation fix.
+ (erc-nickserv-identify-on-connect)
+ (erc-nickserv-identify-on-nick-change): Handle 'both method.
+
+2006-12-28 Leo <[email protected]> (tiny change)
+
+ * erc.el (erc-iswitchb): Wrap body in unwind-protect so that
+ hitting C-g does not leave iswitchb-mode on.
+
+2006-12-27 Michael Olson <[email protected]>
+
+ * erc.el (erc-cmd-RECONNECT): New command that calls
+ erc-server-reconnect.
+
+ * erc-backend.el (erc-server-reconnect-count): New server variable
+ that keeps track of reconnection attempts.
+ (erc-server-reconnect-attempts): New option that determines the
+ number of reconnection attempts that ERC will make per server.
+ (erc-server-reconnect-timeout): New option that determines the
+ amount of time, in seconds, that ERC will wait between successive
+ reconnect attempts.
+ (erc-server-reconnect): New function that reestablishes the
+ current IRC connection. Move some commands from
+ erc-process-sentinel-1 here.
+ (erc-process-sentinel-1): If we have been disconnected, loop until
+ we either reconnect or run out of attempts.
+ (erc-server-reconnect-p): Move higher and make this a defsubst,
+ since I'm worried about the current buffer changing from
+ underneath us. Implement limit of number of reconnect attempts..
+
+ * erc.texi (Getting Started): Update for /RECONNECT command.
+
+2006-12-26 Michael Olson <[email protected]>
+
+ * erc.el (erc-open): Restore old point correctly, or at least get
+ closer to doing so than before.
+
2006-12-13 Leo <[email protected]> (tiny change)
* erc.el (erc-iswitchb): Temporarily enable iswitchb mode if it
@@ -38,7 +91,7 @@
(erc-update-current-channel-member, erc-load-script):
(erc-mode-line-away-status-format): Doc fixes.
-2006-11-20 Andrea Russo <[email protected]>
+2006-11-20 Andrea Russo <[email protected]> (tiny change)
* erc-dcc.el (erc-dcc-chat-setup): Initialize `erc-input-marker'
before calling `erc-display-prompt'.
@@ -111,7 +164,7 @@
`erc-show-my-nick' is non-nil.
(erc-compute-server): Doc fix.
-2006-10-01 John J Foerch <[email protected]>
+2006-10-01 John J Foerch <[email protected]> (tiny change)
* erc-stamp.el (erc-insert-timestamp-right): Exclude the newline
from the erc-timestamp field.
@@ -121,7 +174,7 @@
* erc-nicklist.el (erc-nicklist-insert-contents): Add missing
parenthesis. Thanks to Stephan Stahl for the report.
-2006-09-10 Eric Hanchrow <[email protected]>
+2006-09-10 Eric Hanchrow <[email protected]> (tiny change)
* erc.el (erc-cmd-IGNORE): Prompt user if this might be a regexp
instead of a single user.
@@ -230,6 +283,13 @@
* NEWS: Added note about these changes.
+2006-08-20 Diane Murray <[email protected]>
+
+ * erc-backend.el (erc-process-sentinel-1): Doc fix. Let
+ `erc-server-reconnect-p' check all condition cases.
+ (erc-server-reconnect-p): Moved rest of checks from
+ `erc-process-sentinel-1' to here. Now takes an argument, EVENT.
+
2006-08-21 Diane Murray <[email protected]>
* erc-track.el (erc-track-mode-line-mouse-face): New variable.
@@ -242,6 +302,18 @@
(erc-menu-definition): Name the menu "ERC" instead of "IRC" to
avoid confusion with rcirc and other clients.
+ * erc-backend.el (erc-server-banned): New variable.
+ (erc-server-connect): Set `erc-server-banned' to nil.
+ (erc-process-sentinel-1): Use `erc-server-reconnect-p'.
+ (erc-server-reconnect-p): New function. Return non-nil if the
+ user wants automatic reconnects and if the user has not been
+ banned from the server. This should fix a bug where ERC gets into
+ a loop trying to reconnect with no way to stop it when the user is
+ denied access to the server due to a server ban. It might also
+ help when Tor users are blocked from freenode if freenode servers
+ send the 465 message before disconnecting.
+ (465): Handle "banned from server" error notices.
+
2006-08-13 Romain Francoise <[email protected]>
* 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 82934f9221..c589ae282a 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")
This variable is buffer-local.")
(make-variable-buffer-local 'erc-server-connected)
+(defvar erc-server-reconnect-count 0
+ "Number of times we have failed to reconnect to the current server.")
+(make-variable-buffer-local 'erc-server-reconnect-count)
+
(defvar erc-server-quitting nil
"Non-nil if the user requests a quit.")
(make-variable-buffer-local 'erc-server-quitting)
+(defvar erc-server-banned nil
+ "Non-nil if the user is denied access because of a server ban.")
+(make-variable-buffer-local 'erc-server-banned)
+
(defvar erc-server-lines-sent nil
"Line counter.")
(make-variable-buffer-local 'erc-server-lines-sent)
@@ -259,6 +267,23 @@ Reconnection will happen automatically for any unexpected disconnection."
:group 'erc-server
:type 'boolean)
+(defcustom erc-server-reconnect-attempts 2
+ "The number of times that ERC will attempt to reestablish a
+broken connection, or t to always attempt to reconnect.
+
+This only has an effect if `erc-server-auto-reconnect' is non-nil."
+ :group 'erc-server
+ :type '(choice (const :tag "Always reconnect" t)
+ integer))
+
+(defcustom erc-server-reconnect-timeout 1
+ "The amount of time, in seconds, that ERC will wait between
+successive reconnect attempts.
+
+If a key is pressed while ERC is waiting, it will stop waiting."
+ :group 'erc-server
+ :type 'number)
+
(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.
@@ -434,6 +459,7 @@ We will store server variables in the current buffer."
(message "%s...done" msg))
;; Misc server variables
(setq erc-server-quitting nil)
+ (setq erc-server-banned 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)
@@ -457,6 +483,21 @@ We will store server variables in the current buffer."
"Opening connection..\n")
(erc-login)))
+(defun erc-server-reconnect ()
+"Reestablish the current IRC connection.
+Make sure you are in an ERC buffer when running this."
+ (let ((server (erc-server-buffer)))
+ (unless (and server
+ (buffer-live-p server))
+ (error "Couldn't switch to server buffer"))
+ (with-current-buffer server
+ (erc-update-mode-line)
+ (erc-set-active-buffer (current-buffer))
+ (setq erc-server-last-sent-time 0)
+ (setq erc-server-lines-sent 0)
+ (erc-open erc-session-server erc-session-port erc-server-current-nick
+ erc-session-user-full-name t erc-session-password))))
+
(defun erc-server-filter-function (process string)
"The process filter for the ERC server."
(with-current-buffer (process-buffer process)
@@ -485,11 +526,24 @@ We will store server variables in the current buffer."
(match-end 0))))
(erc-parse-server-response process line)))))))
+(defsubst erc-server-reconnect-p (event)
+ "Return non-nil if ERC should attempt to reconnect automatically.
+EVENT is the message received from the closed connection process."
+ (and erc-server-auto-reconnect
+ (not erc-server-banned)
+ ;; make sure we don't infinitely try to reconnect, unless the
+ ;; user wants that
+ (or (eq erc-server-reconnect-attempts t)
+ (and (integerp erc-server-reconnect-attempts)
+ (< erc-server-reconnect-count erc-server-reconnect-attempts)))
+ (not (string-match "^deleted" event))
+ ;; open-network-stream-nowait error for connection refused
+ (not (string-match "^failed with code 111" event))))
+
(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."
+ "Called when `erc-process-sentinel' has decided that we're disconnecting.
+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
@@ -498,25 +552,26 @@ action."
(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-match "^deleted" event))
- ;; open-network-stream-nowait error for connection refused
- (not (string-match "^failed with code 111" event)))
- ;; Yuck, this should perhaps funcall
- ;; erc-server-reconnect-function with no args
- (erc-open erc-session-server erc-session-port erc-server-current-nick
- erc-session-user-full-name t erc-session-password)
- ;; terminate, do not reconnect
- (erc-display-message nil 'error (current-buffer)
- 'terminated ?e event))))
+ (let ((again t))
+ (while again
+ (setq again nil)
+ (erc-display-message nil 'error (current-buffer)
+ (if (erc-server-reconnect-p event)
+ 'disconnected
+ 'disconnected-noreconnect))
+ (if (erc-server-reconnect-p event)
+ (condition-case err
+ (progn
+ (erc-server-reconnect)
+ (setq erc-server-reconnect-count 0))
+ (error (when (integerp erc-server-reconnect-attempts)
+ (setq erc-server-reconnect-count
+ (1+ erc-server-reconnect-count))
+ (sit-for erc-server-reconnect-timeout)
+ (setq again t))))
+ ;; terminate, do not reconnect
+ (erc-display-message nil 'error (current-buffer)
+ 'terminated ?e event))))))
(defun erc-process-sentinel (cproc event)
"Sentinel function for ERC process."
@@ -1708,6 +1763,14 @@ See `erc-display-server-message'." nil
?c (second (erc-response.command-args parsed))
?m (erc-response.contents parsed)))
+(define-erc-response-handler (465)
+ "You are banned from this server." nil
+ (setq erc-server-banned t)
+ ;; show the server's message, as a reason might be provided
+ (erc-display-error-notice
+ parsed
+ (erc-response.contents parsed)))
+
(define-erc-response-handler (474)
"Banned from channel errors" nil
(erc-display-message parsed '(notice error) nil
@@ -1741,7 +1804,7 @@ See `erc-display-server-message'." nil
(erc-display-message parsed '(error notice) 'active 's482
?c channel ?m message)))
-(define-erc-response-handler (431 445 446 451 462 463 464 465 481 483 484 485
+(define-erc-response-handler (431 445 446 451 462 463 464 481 483 484 485
491 501 502)
;; 431 - No nickname given
;; 445 - SUMMON has been disabled
@@ -1750,7 +1813,6 @@ See `erc-display-server-message'." nil
;; 462 - Unauthorized command (already registered)
;; 463 - Your host isn't among the privileged
;; 464 - Password incorrect
- ;; 465 - You are banned from this server
;; 481 - Need IRCop privileges
;; 483 - You can't kill a server!
;; 484 - Your connection is restricted!
diff --git a/lisp/erc/erc-networks.el b/lisp/erc/erc-networks.el
index 99aba31c3d..034950e665 100644
--- a/lisp/erc/erc-networks.el
+++ b/lisp/erc/erc-networks.el
@@ -64,6 +64,7 @@
("AngelEyez: Random server" AngelEyez "irc.angeleyez.net" ((6666 7000)))
("AnotherNet: Random server" Anothernet "irc.another.net" (6667 7000 ))
("ArabChat: Random server" ArabChat "irc.arabchat.org" ((6660 6667)))
+ ("Ars-OpenIRC: Random server" Ars "irc.arstechnica.com" 6667)
("AsiaTalk: Random server" AsiaTalk "irc.asiatalk.org" ((6667 6669) 7000 ))
("AstroLink: Random server" AstroLink "irc.astrolink.org" ((6660 6667)))
("Asylumnet: Random server" Asylumnet "irc.asylum-net.org" ((6661 6669) 7000 7777 ))
@@ -280,12 +281,12 @@
("K0wNet: Random server" K0wNet "irc.k0w.net" ((6660 6669)))
("KDFSnet: Random server" KDFSnet "irc.kdfs.net" ((6667 6669)))
("Kemik: Random server" Kemik "irc.kemik.net" 6667)
- ("Kewl.Org: Random server" Kewl.Org "irc.kewl.org" (6667 7000 ))
+ ("Kewl.Org: Random server" Kewl\.Org "irc.kewl.org" (6667 7000 ))
("Kickchat: Random server" Kickchat "irc.kickchat.com" ((6660 6669) 7000 ))
("Kidsworld: Random server" KidsWorld "irc.kidsworld.org" ((6666 6669)))
("Knightnet: AF, ZA, Durban" Knightnet "orc.dbn.za.knightnet.net" (6667 5555 ))
("Knightnet: US, CA, Goldengate" Knightnet "goldengate.ca.us.knightnet.net" (6667 5555 ))
- ("Konfido.Net: Random server" Konfido.Net "irc.konfido.net" 6667)
+ ("Konfido.Net: Random server" Konfido\.Net "irc.konfido.net" 6667)
("KreyNet: Random server" Kreynet "irc.krey.net" 6667)
("Krono: Random server" Krono "irc.krono.net" ((6660 6669) 7000 ))
("Krushnet: Random server" Krushnet "irc.krushnet.org" 6667)
@@ -294,6 +295,7 @@
("LagNet: AF, ZA, Johannesburg" LagNet "mystery.lagnet.org.za" 6667)
("Librenet: Random server" Librenet "irc.librenet.net" 6667)
("LinkNet: Random server" LinkNet "irc.link-net.org" ((6667 6669)))
+ ("LinuxChix: Random server" LinuxChix "irc.linuxchix.org" 6667)
("Liquidized: Random server" Liquidized "irc.liquidized.net" (6667 7000 ))
("M-IRC: Random server" M-IRC "irc.m-sys.org" ((6667 6669)))
("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."
(AngelEyez "angeleyez.net")
(Anothernet "another.net")
(ArabChat "arabchat.org")
+ (Ars "arstechnica.com")
(AsiaTalk "asiatalk.org")
(AstroLink "astrolink.org")
(Asylumnet "asylumnet.org")
@@ -586,6 +589,7 @@ PORTS is either a number, a list of numbers, or a list of port ranges."
(LagNet "lagnet.org.za")
(Librenet "librenet.net")
(LinkNet "link-net.org")
+ (LinuxChix "cats\.meow\.at\\|linuxchix\.org")
(Liquidized "liquidized.net")
(M-IRC "m-sys.org")
(MagicStar "magicstar.net")
diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el
index c8bac7fe45..b93317e612 100644
--- a/lisp/erc/erc-services.el
+++ b/lisp/erc/erc-services.el
@@ -94,7 +94,7 @@ communication with those Services."
(interactive
(list (intern (completing-read
"Choose Nickserv identify mode (RET to disable): "
- '(("autodetect") ("nick-change")) nil t))))
+ '(("autodetect") ("nick-change") ("both")) nil t))))
(cond ((eq mode 'autodetect)
(setq erc-nickserv-identify-mode 'autodetect)
(add-hook 'erc-server-NOTICE-functions
@@ -111,6 +111,14 @@ communication with those Services."
'erc-nickserv-identify-on-nick-change)
(remove-hook 'erc-server-NOTICE-functions
'erc-nickserv-identify-autodetect))
+ ((eq mode 'both)
+ (setq erc-nickserv-identify-mode 'both)
+ (add-hook 'erc-server-NOTICE-functions
+ 'erc-nickserv-identify-autodetect)
+ (add-hook 'erc-after-connect
+ 'erc-nickserv-identify-on-connect)
+ (add-hook 'erc-nick-changed-functions
+ 'erc-nickserv-identify-on-nick-change))
(t
(setq erc-nickserv-identify-mode nil)
(remove-hook 'erc-server-NOTICE-functions
@@ -120,22 +128,25 @@ communication with those Services."
(remove-hook 'erc-nick-changed-functions
'erc-nickserv-identify-on-nick-change))))
-(defcustom erc-nickserv-identify-mode 'autodetect
+(defcustom erc-nickserv-identify-mode 'both
"The mode which is used when identifying to Nickserv.
Possible settings are:.
'autodetect - Identify when the real Nickserv sends an identify request.
'nick-change - Identify when you change your nickname.
+'both - Do the former if the network supports it, otherwise do the
+ latter.
nil - Disables automatic Nickserv identification.
You can also use M-x erc-nickserv-identify-mode to change modes."
:group 'erc-services
:type '(choice (const autodetect)
(const nick-change)
+ (const both)
(const nil))
:set (lambda (sym val)
- (set-default sym val)
+ (set sym val)
(erc-nickserv-identify-mode val)))
(defcustom erc-prompt-for-nickserv-password t
@@ -156,12 +167,14 @@ Example of use:
(list :tag "Network"
(choice :tag "Network name"
(const freenode)
+ (const OFTC)
(const DALnet)
(const GalaxyNet)
(const SlashNET)
(const BRASnet)
(const iip)
(const Austnet)
+ (const Azzurra)
(symbol :tag "Network name"))
(repeat :tag "Nickname and password"
(cons :tag "Identity"
@@ -209,24 +222,24 @@ Example of use:
"IDENTIFY"
nil
"")
- (Austnet
- "/msg\\[email protected]\\s-identify\\s-<password>"
- "identify"
- nil)
- (Azzurra
- "/ns\\s-IDENTIFY\\s-password"
- "NickServ"
- "IDENTIFY"
- nil)
- (OFTC
- "/msg\\s-NickServ\\s-IDENTIFY\\s-\^_password"
- "NickServ"
- "IDENTIFY"
- nil))
+ (Austnet
+ "/msg\\[email protected]\\s-identify\\s-<password>"
+ "identify"
+ nil)
+ (Azzurra
+ "/ns\\s-IDENTIFY\\s-password"
+ "NickServ"
+ "IDENTIFY"
+ nil)
+ (OFTC
+ "/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
\(SYMBOL NICKSERV REGEXP NICK KEYWORD USE-CURRENT ANSWER)
@@ -279,14 +292,18 @@ password for this nickname, otherwise try to send it automatically."
(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))
+ (unless (or (and (null erc-nickserv-passwords)
+ (null erc-prompt-for-nickserv-password))
+ (and (eq erc-nickserv-identify-mode 'both)
+ (nth 2 (assoc (erc-network) erc-nickserv-alist))))
(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))
+ (unless (or (and (null erc-nickserv-passwords)
+ (null erc-prompt-for-nickserv-password))
+ (and (eq erc-nickserv-identify-mode 'both)
+ (nth 2 (assoc (erc-network) erc-nickserv-alist))))
(erc-nickserv-call-identify-function nick)))
(defun erc-nickserv-call-identify-function (nickname)
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 7de2828b86..427dd17838 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1672,21 +1672,22 @@ needs to be active for this function to work."
(require 'iswitchb))
(let ((enabled iswitchb-mode))
(or enabled (iswitchb-mode 1))
- (let ((iswitchb-make-buflist-hook
- (lambda ()
- (setq iswitchb-temp-buflist
- (mapcar 'buffer-name
- (erc-buffer-list
- nil
- (when arg erc-server-process)))))))
- (switch-to-buffer
- (iswitchb-read-buffer
- "Switch-to: "
- (if (boundp 'erc-modified-channels-alist)
- (buffer-name (caar (last erc-modified-channels-alist)))
- nil)
- t)))
- (or enabled (iswitchb-mode -1))))
+ (unwind-protect
+ (let ((iswitchb-make-buflist-hook
+ (lambda ()
+ (setq iswitchb-temp-buflist
+ (mapcar 'buffer-name
+ (erc-buffer-list
+ nil
+ (when arg erc-server-process)))))))
+ (switch-to-buffer
+ (iswitchb-read-buffer
+ "Switch-to: "
+ (if (boundp 'erc-modified-channels-alist)
+ (buffer-name (caar (last erc-modified-channels-alist)))
+ nil)
+ t)))
+ (or enabled (iswitchb-mode -1)))))
(defun erc-channel-list (proc)
"Return a list of channel buffers.
@@ -1888,10 +1889,11 @@ Returns the buffer for the given server or channel."
(connected-p (unless connect erc-server-connected))
(buffer (erc-get-buffer-create server port channel))
(old-buffer (current-buffer))
- (old-point (point))
+ old-point
continued-session)
(erc-update-modules)
(set-buffer buffer)
+ (setq old-point (point))
(erc-mode)
(setq erc-server-announced-name server-announced-name)
(setq erc-server-connected connected-p)
@@ -3165,6 +3167,12 @@ the message given by REASON."
(defalias 'erc-cmd-GQ 'erc-cmd-GQUIT)
(put 'erc-cmd-GQUIT 'do-not-parse-args t)
+(defun erc-cmd-RECONNECT ()
+ "Try to reconnect to the current IRC server."
+ (setq erc-server-reconnect-count 0)
+ (erc-server-reconnect)
+ t)
+
(defun erc-cmd-SERVER (server)
"Connect to SERVER, leaving existing connection intact."
(erc-log (format "cmd: SERVER: %s" server))