[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch to fix ERC mode's IRC protocol logging

From: Fran Litterio
Subject: Patch to fix ERC mode's IRC protocol logging
Date: Mon, 19 Jul 2010 13:19:01 -0400

The below patch fixes a problem in ERC where erc-toggle-debug-irc-protocol
was not logging inbound protocol data. It also changes the key to interactively
toggle protocol logging so that it doesn't interfere with View mode bindings.

--- lisp/erc/erc.el~    2010-07-15 12:10:04.000000000 -0400
+++ lisp/erc/erc.el    2010-07-19 13:06:51.656250000 -0400
@@ -2306,14 +2306,14 @@
       (insert (erc-make-notice "This buffer displays all IRC protocol
traffic exchanged with each server.\n"))
       (insert (erc-make-notice "Kill this buffer to terminate
protocol logging.\n\n")))
     (use-local-map (make-sparse-keymap))
-    (local-set-key (kbd "RET") 'erc-toggle-debug-irc-protocol))
+    (local-set-key (kbd "t") 'erc-toggle-debug-irc-protocol))
       (add-hook 'kill-buffer-hook
         #'(lambda () (setq erc-debug-irc-protocol nil))
         nil 'local)
       (goto-char (point-max))
       (let ((inhibit-read-only t))
     (insert (erc-make-notice
-         (format "IRC protocol logging %s at %s -- Press ENTER to
toggle logging.\n"
+         (format "IRC protocol logging %s at %s -- Press 't' to
toggle logging.\n"
              (if erc-debug-irc-protocol "disabled" "enabled")
     (setq erc-debug-irc-protocol (not erc-debug-irc-protocol))

--- lisp/erc/erc-backend.el~    2010-07-15 12:10:04.000000000 -0400
+++ lisp/erc/erc-backend.el    2010-07-19 13:06:49.234375000 -0400
@@ -574,6 +574,7 @@
                     (substring erc-server-filter-data
                                (match-end 0))))
+            (erc-log-irc-protocol line nil)
             (erc-parse-server-response process line)))))))

 (defsubst erc-server-reconnect-p (event)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]