GNTP implementation for Emacs
Emacs Lisp
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


GNTP implementation for Emacs. It's very incomplete, no encryption, no real error handling etc. but has just what I need. Feel free to improve it.


This is the setup I use for rcirc:

;;; Growl notifications for IRC
(setq gntp-icon-path "C:/home/site-lisp/todochiku-icons/")
(setq gntp-application-icon (concat gntp-icon-path "emacs_32.png"))
(setq gntp-server "localhost")

;; register notifications, only needs to be done once per server

(let ((notifications
            :display "IRC Mention"
            :enabled t
            :icon ,(concat gntp-icon-path "groupevent.png"))
            :display "IRC Convo"
            :enabled t
            :icon ,(concat gntp-icon-path "chat.png")))))
  (gntp-register notifications gntp-server))

(defun gntp-convo-rcirc-print-hook (process sender response target text)
  (when (and (string= sender target)
             (not (string= (rcirc-nick process) sender))
             (not (string= (rcirc-server-name process) sender))
             (not (memq (rcirc-get-buffer process target t)
    (gntp-notify 'irc-convo "IRC convo"
                 (format "<%s> %s" sender text) gntp-server)))
(add-hook 'rcirc-print-functions 'gntp-convo-rcirc-print-hook)

(defun gntp-rcirc-print-hook (process sender response target text)
  (when (and (rcirc-channel-p target)
             (string-match (rcirc-nick process) text)
             (not (string= (rcirc-nick process) sender))
             (not (string= (rcirc-server-name process) sender)))
    (gntp-notify 'irc-mention (format "IRC mention" target)
                 (format "%s <%s> %s" target sender text)
(add-hook 'rcirc-print-functions 'gntp-rcirc-print-hook)

Authors & Contributors