[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23700: Patch to fix erc-kill-channel sending command to server when
From: |
Fran Litterio |
Subject: |
bug#23700: Patch to fix erc-kill-channel sending command to server when no connection |
Date: |
Sun, 5 Jun 2016 17:47:58 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
In the latest Emacs sources, function erc-default-target returns
nil when ERC is no longer connected to the server for the current
ERC buffer. This can cause erc-kill-channel to try to send a
command to the disconnected server when a channel buffer is killed.
This patch fixes that.
--
Fran Litterio
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 8501e2c..da5edf1 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -6735,9 +6735,10 @@ This function should be on `erc-kill-server-hook'."
This function should be on `erc-kill-channel-hook'."
(when (erc-server-process-alive)
(let ((tgt (erc-default-target)))
- (erc-server-send (format "PART %s :%s" tgt
- (funcall erc-part-reason nil))
- nil tgt))))
+ (if tgt
+ (erc-server-send (format "PART %s :%s" tgt
+ (funcall erc-part-reason nil))
+ nil tgt)))))
;;; Dealing with `erc-parsed'
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#23700: Patch to fix erc-kill-channel sending command to server when no connection,
Fran Litterio <=