18 Feb 11:19
PRIVMSG notification duplication
Alexis Hazell <alexis.hazell <at> gmail.com>
2009-02-18 10:19:09 GMT
2009-02-18 10:19:09 GMT
Hi all,
i've written my own ERC notification funtion:
(defun erc-my-notify (proc parsed)
(setq info (aref parsed 2))
(setq sender (match-string (string-match "^[^!]+" info) info))
(setq current-conv (match-string (string-match "^[^@]+" (buffer-name)) (buffer-name)))
(if (not (string= current-conv sender))
(shell-command "zenity --info --text='PRIVMSG received'"))
1)
and added it to erc-server-PRIVMSG-functions:
(add-hook 'erc-server-PRIVMSG-functions 'erc-my-notify t)
However, for some reason it gets called twice on each PRIVMSG. Any
suggestions as to what i'm doing wrong?
Thanks in anticipation,
Alexis.
RSS Feed