1 ;;; zenirc-random-away.el
3 ;; Copyright (C) 1995 Eric Prestemon
5 ;; Author: Eric Prestemon <ecp@io.com>
6 ;; Maintainer: eric@american.edu
7 ;; Keywords: zenirc, extensions
10 ;; This program is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; This program is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with this program; if not, you can either send email to this
22 ;; program's maintainer or write to: The Free Software Foundation,
23 ;; Inc.; 675 Massachusetts Avenue; Cambridge, MA 02139, USA.
30 (defvar zenirc-random-away-strings
31 '("I've felt better, but it cost more."
32 "I want to be the one with the most cake."
33 "Someday you will ache like I ache."
34 "Do you have the time to listen to me whine?"
35 "Neurotic in my head no doubt about it."
36 "Oh what a feeling when we're dancing on the ceiling."
37 "What's so funny about peace, love, and understanding?")
38 "*List of strings to use for /away messages")
40 (defun zenirc-random-away (proc parsedmsg)
41 "Change away message to a new thing."
42 (and (not (zenirc-channel-p (aref parsedmsg 2)))
43 (process-send-string proc
45 (nth (random (length zenirc-random-away-strings))
46 zenirc-random-away-strings)
49 (zenirc-add-hook 'zenirc-server-PRIVMSG-hook 'zenirc-random-away t)
51 (provide 'zenirc-random-away)
53 ;;; zenirc-random-away.el ends here