;; If people really need this, we can convert it into a proper option.
-(defvar erc-dcc--X-send-final-turbo-ack nil
+(defvar erc-dcc--send-final-turbo-ack nil
"Workaround for maverick turbo senders that only require a final ACK.
The only known culprit is WeeChat, with its xfer.network.fast_send
option, which is on by default. Leaving this set to nil and calling
;; Some senders want us to hang up. Only observed w. TSEND.
((and (plist-get erc-dcc-entry-data :turbo)
(= received-bytes (plist-get erc-dcc-entry-data :size)))
- (when erc-dcc--X-send-final-turbo-ack
+ (when erc-dcc--send-final-turbo-ack
(process-send-string proc (erc-pack-int received-bytes)))
(delete-process proc))
((not (or (plist-get erc-dcc-entry-data :turbo)
(proc (plist-get entry :peer))
(parent-proc (plist-get entry :parent)))
(erc-setup-buffer buffer)
- ;; buffer is now the current buffer.
- (erc-dcc-chat-mode)
- (setq erc-server-process parent-proc)
- (setq erc-dcc-from nick)
- (setq erc-dcc-entry-data entry)
- (setq erc-dcc-unprocessed-output "")
- (setq erc-insert-marker (point-max-marker))
- (setq erc-input-marker (make-marker))
- (erc-display-prompt buffer (point-max))
- (set-process-buffer proc buffer)
- (add-hook 'kill-buffer-hook #'erc-dcc-chat-buffer-killed nil t)
- (run-hook-with-args 'erc-dcc-chat-connect-hook proc)
+ (with-current-buffer buffer
+ (erc-dcc-chat-mode)
+ (setq erc-server-process parent-proc
+ erc-dcc-from nick
+ erc-dcc-entry-data entry
+ erc-dcc-unprocessed-output ""
+ erc-insert-marker (point-max-marker)
+ erc-input-marker (make-marker))
+ (erc-display-prompt buffer (point-max))
+ (set-process-buffer proc buffer)
+ (add-hook 'kill-buffer-hook #'erc-dcc-chat-buffer-killed nil t)
+ (run-hook-with-args 'erc-dcc-chat-connect-hook proc))
buffer))
(defun erc-dcc-chat-accept (entry parent-proc)