1 ;;; zenirc-signal.el --- Fancy signal formatting for ZenIRC
3 ;; Copyright (C) 1993, 1994 Ben A. Mesander
4 ;; Copyright (C) 1998 Per Persson
6 ;; Author: Mark Bailen <msbailen@msbdcolka.cr.usgs.gov>
7 ;; Ben A. Mesander <ben@gnu.ai.mit.edu>
8 ;; Maintainer: pp@sno.pp.se
9 ;; Keywords: extensions
10 ;; Created: 1993/06/03
12 ;; This program is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
17 ;; This program is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with this program; if not, you can either send email to this
24 ;; program's maintainer or write to: The Free Software Foundation,
25 ;; Inc.; 675 Massachusetts Avenue; Cambridge, MA 02139, USA.
29 ;; This code detects if the message that triggered the signal was
30 ;; a PRIVMSG, and if so, formats it differently. Otherwise, it calls
31 ;; the regular zenirc-signal-hook subroutine(s).
37 (defun zenirc-signal-privmsg (proc msg)
38 (let ((pmsg (zenirc-parse-server-message msg)))
39 (cond ((string= "PRIVMSG" (aref pmsg 0))
40 (zenirc-message nil "[%s] %s->%s: %s"
42 (zenirc-run-hook 'zenirc-format-nickuserhost-hook
46 (setq zenirc-run-next-hook nil)))))
48 (provide 'zenirc-signal)
50 (zenirc-add-hook 'zenirc-signal-hook 'zenirc-signal-privmsg)
52 ;; zenirc-signal.el ends here