erc-discuss
[Top][All Lists]
Advanced

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

[Erc-discuss] PRIVMSG notification duplication


From: Alexis Hazell
Subject: [Erc-discuss] PRIVMSG notification duplication
Date: Wed, 18 Feb 2009 21:19:09 +1100
User-agent: Mutt/1.5.18 (2008-05-17)

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 "address@hidden" 
(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.




reply via email to

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