Remove xetla pkg
[packages] / xemacs-packages / zenirc / src / zenirc-8ball.el
1 ;;; zenirc-8ball.el --- magic 8 ball for ZenIRC
2
3 ;; Copyright (C) 1996 Mark S Bailen
4 ;; Copyright (C) 1997 Noah Friedman
5
6 ;; Bozo:  Mark S Bailen
7 ;; Maintainer: Noah Friedman <friedman@prep.ai.mit.edu>
8 ;; Keywords: zenirc, extensions, magic, 8ball
9 ;; Created: 1996-10-4
10
11 ;; This program is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
14 ;; any later version.
15 ;;
16 ;; This program is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 ;; GNU General Public License for more details.
20 ;;
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with this program; if not, you can either send email to this
23 ;; program's maintainer or write to: The Free Software Foundation,
24 ;; Inc.; 675 Massachusetts Avenue; Cambridge, MA 02139, USA.
25
26 ;;; Commentary:
27
28 ;; Code hacked from Noah's zenirc-yow.el and Eric's zenirc-random-away.el
29 ;; Rewritten 1997-03-03 by Noah to use zenirc-trigger.el.
30
31 ;;; Code:
32
33 (require 'zenirc)
34 (require 'zenirc-trigger)
35
36 (defconst zenirc-8ball-prefix "magic 8-ball says ====>")
37
38 (defconst zenirc-8ball-responses
39   '("CERTAINLY"
40     "DEFINITELY NOT"
41     "MAYBE"
42     "NO"
43     "REPLY HAZY, TRY AGAIN LATER"
44     "YES"))
45
46 (defun zenirc-8ball ()
47   (concat zenirc-8ball-prefix " "
48           (nth (random (length zenirc-8ball-responses))
49                zenirc-8ball-responses)))
50
51 (zenirc-trigger-register "8ball" 'zenirc-8ball "\\b8 ball\\b")
52
53 (provide 'zenirc-8ball)
54
55 ;;; zenirc-8ball.el ends here