summaryrefslogtreecommitdiff
path: root/lisp/erc/erc-backend.el
diff options
context:
space:
mode:
authorF. Jason Park <jp@neverwas.me>2022-07-24 05:14:24 -0700
committerF. Jason Park <jp@neverwas.me>2022-07-27 05:19:09 -0700
commit4a5499910a114a5e8a8b41e04397c20dec14935b (patch)
tree65b718c5b73985ccb5ef6e10a5af1cfeb4cd9b66 /lisp/erc/erc-backend.el
parent69f578e04712616f91080ab26485db9faacb3a70 (diff)
downloademacs-4a5499910a114a5e8a8b41e04397c20dec14935b.tar.gz
Fix CTCP regression in erc-server-PRIVMSG
* lisp/erc/erc-backend.el (erc-server-PRIVMSG): Don't create a query buffer for non-ACTION CTCP messages. * test/lisp/erc/erc-scenarios-misc.el (erc-scenarios-dcc-chat-accept): Add test for basic DCC CHAT accept dialog. * test/lisp/erc/resources/dcc/chat/accept-dcc.eld: New file. * test/lisp/erc/resources/dcc/chat/accept.eld: New file.
Diffstat (limited to 'lisp/erc/erc-backend.el')
-rw-r--r--lisp/erc/erc-backend.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index 8be4894ecbb..46c96c1a749 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -1526,11 +1526,13 @@ add things to `%s' instead."
(setf (erc-response.contents parsed) msg)
(setq buffer (erc-get-buffer (if privp nick tgt) proc))
;; Even worth checking for empty target here? (invalid anyway)
- (unless (or buffer noticep (string-empty-p tgt) (eq ?$ (aref tgt 0)))
- (if (and privp msgp (not (erc-is-message-ctcp-and-not-action-p msg)))
+ (unless (or buffer noticep (string-empty-p tgt) (eq ?$ (aref tgt 0))
+ (erc-is-message-ctcp-and-not-action-p msg))
+ (if privp
(when erc-auto-query
(let ((erc-join-buffer erc-auto-query))
(setq buffer (erc--open-target nick))))
+ ;; A channel buffer has been killed but is still joined
(setq buffer (erc--open-target tgt))))
(when buffer
(with-current-buffer buffer