1 ;;; zenirc-oink.el --- auto-oink
3 ;; Copyright (C) 1995, 1997 Noah S. Friedman
5 ;; Author: Noah Friedman <friedman@prep.ai.mit.edu>
6 ;; Maintainer: friedman@prep.ai.mit.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.
28 (require 'zenirc-trigger)
30 (defconst zenirc-oink-response-percentage 1)
32 (defconst zenirc-oink-response-list
39 "you will be in your oink soon"
41 ":1 s/oink/oink oink/g; b 1"
42 ;; the oink combinator
43 "(define oink (lambda (oink?) ((lambda (oink) (oink? (lambda (oink!) ((oink oink) oink!)))) (lambda (oink) (oink? (lambda (oink!) ((oink oink) oink!)))))))"))
46 (and (< (random 1000) zenirc-oink-response-percentage)
47 (nth (random (length zenirc-oink-response-list))
48 zenirc-oink-response-list)))
50 (zenirc-trigger-register "oink" 'zenirc-oink "oink\\|knio")
52 (provide 'zenirc-oink)
54 ;; zenirc-oink.el ends here