[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
rcirc multiline nick adding
From: |
Nic James Ferrier |
Subject: |
rcirc multiline nick adding |
Date: |
Wed, 18 Apr 2007 13:55:44 +0100 |
I was having a problem with multiline not sending proper multiline
messages with bitlbee. This diff fixes it for me... not sure if
anybody else ever had the same problem.
--- /home/nferrier/rcirc.el~ 2007-03-06 10:56:01.000000000 +0000
+++ /home/nferrier/rcirc.el 2007-04-18 13:50:05.000000000 +0100
@@ -1011,6 +1011,12 @@
"Send the text in buffer back to parent buffer."
(interactive)
(assert rcirc-parent-buffer)
+ ;; Is there a nick at the start of the multiline buffer? if so add it to all
the lines
+ (goto-char (point-min))
+ (if (looking-at "^[^ :]+: ")
+ (let ((nick (match-string 0)))
+ (while (re-search-forward "\n" nil t)
+ (replace-match (concat "\n" nick)))))
(untabify (point-min) (point-max))
(let ((text (buffer-substring (point-min) (point-max)))
(buffer (current-buffer))
--
Nic Ferrier
http://www.tapsellferrier.co.uk