Subject: [Aidan Gauland] Re: ERC match ACTION patch

From: Stefan Monnier <[email-masked]>
Date: Mon, 11 Feb 2013 17:26:29 -0500

Forwarding so as to get a bug-number.

        Stefan

Subject: Re: ERC match ACTION patch
From: Aidan Gauland <[email-masked]>
To: [email-masked]
Date: Tue, 12 Feb 2013 08:07:17 +1300
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>

Aidan Gauland <[email-masked]> writes:
> `erc-match-message' truncates the beginning of ACTION messages.  This
> should fix it, but I'm not certain that I have not missed any obscure
> edge cases.
>
> –Aidan

Aaaaand here's the patch I forgot.
=== modified file 'lisp/erc/erc-match.el'
--- lisp/erc/erc-match.el	2013-01-02 16:13:04 +0000
+++ lisp/erc/erc-match.el	2013-02-11 18:36:54 +0000
@@ -454,7 +454,15 @@
 		     (match-end 0)))
 	 (message (buffer-substring (if (and nick-end
 					     (<= (+ 2 nick-end) (point-max)))
-					(+ 2 nick-end)
+					(+ nick-end
+					   ;; Message starts 2 characters after
+					   ;; the nick except for CTCP ACTION
+					   ;; messages.
+					   (if (string= "* "
+							(buffer-substring (- nick-beg 2)
+									  nick-beg))
+					       1
+					     2))
 				      (point-min))
 				    (point-max))))
     (when (and vector