From bmastenbrook at common-lisp.net Wed Oct 20 20:21:33 2004 From: bmastenbrook at common-lisp.net (Brian Mastenbrook) Date: Wed, 20 Oct 2004 22:21:33 +0200 Subject: [Cl-irc-cvs] CVS update: cl-irc/example/cliki.lisp cl-irc/example/specbot.lisp Message-ID: Update of /project/cl-irc/cvsroot/cl-irc/example In directory common-lisp.net:/home/bmastenbrook/cl-irc/example Modified Files: cliki.lisp specbot.lisp Log Message: Update for changes in lisppaste Date: Wed Oct 20 22:21:33 2004 Author: bmastenbrook Index: cl-irc/example/cliki.lisp diff -u cl-irc/example/cliki.lisp:1.26 cl-irc/example/cliki.lisp:1.27 --- cl-irc/example/cliki.lisp:1.26 Thu Aug 12 18:24:54 2004 +++ cl-irc/example/cliki.lisp Wed Oct 20 22:21:33 2004 @@ -1,4 +1,4 @@ - ;;;; $Id: cliki.lisp,v 1.26 2004/08/12 16:24:54 bmastenbrook Exp $ + ;;;; $Id: cliki.lisp,v 1.27 2004/10/20 20:21:33 bmastenbrook Exp $ ;;;; $Source: /project/cl-irc/cvsroot/cl-irc/example/cliki.lisp,v $ ;;;; cliki.lisp - CLiki as an infobot; only works on SBCL. @@ -545,7 +545,7 @@ channel (> (length channel) 0) (char= (elt channel 0) #\#) - (funcall (intern "SAY-HELP" :lisppaste) + (funcall (intern "IRC-SAY-HELP" :lisppaste) channel)) (return-from cliki-lookup nil)) (or Index: cl-irc/example/specbot.lisp diff -u cl-irc/example/specbot.lisp:1.7 cl-irc/example/specbot.lisp:1.8 --- cl-irc/example/specbot.lisp:1.7 Thu Aug 5 18:54:09 2004 +++ cl-irc/example/specbot.lisp Wed Oct 20 22:21:33 2004 @@ -1,4 +1,4 @@ -;;;; $Id: specbot.lisp,v 1.7 2004/08/05 16:54:09 bmastenbrook Exp $ +;;;; $Id: specbot.lisp,v 1.8 2004/10/20 20:21:33 bmastenbrook Exp $ ;;;; $Source: /project/cl-irc/cvsroot/cl-irc/example/specbot.lisp,v $ ;;;; specbot.lisp - an example IRC bot for cl-irc @@ -137,9 +137,18 @@ (or *load-truename* *default-pathname-defaults*))))) +(defparameter *sus-file* + (merge-pathnames "sus.lisp-expr" + (make-pathname + :directory + (pathname-directory + (or *load-truename* + *default-pathname-defaults*))))) + (defun start-specbot (nick server &rest channels) (add-simple-alist-lookup *754-file* 'ieee754 "ieee754" "Section numbers of IEEE 754") (add-simple-alist-lookup *ppc-file* 'ppc "ppc" "PowerPC assembly mnemonics") + (add-simple-alist-lookup *sus-file* 'sus "posix" "Single UNIX Specification") (setf *nickname* nick) (setf *connection* (connect :nickname *nickname* :server server)) (mapcar #'(lambda (channel) (join *connection* channel)) channels) From bmastenbrook at common-lisp.net Tue Oct 26 01:38:50 2004 From: bmastenbrook at common-lisp.net (Brian Mastenbrook) Date: Tue, 26 Oct 2004 03:38:50 +0200 Subject: [Cl-irc-cvs] CVS update: cl-irc/example/specbot.lisp Message-ID: Update of /project/cl-irc/cvsroot/cl-irc/example In directory common-lisp.net:/home/bmastenbrook/cl-irc/example Modified Files: specbot.lisp Log Message: Fix help for /msg Date: Tue Oct 26 03:38:49 2004 Author: bmastenbrook Index: cl-irc/example/specbot.lisp diff -u cl-irc/example/specbot.lisp:1.8 cl-irc/example/specbot.lisp:1.9 --- cl-irc/example/specbot.lisp:1.8 Wed Oct 20 22:21:33 2004 +++ cl-irc/example/specbot.lisp Tue Oct 26 03:38:49 2004 @@ -1,4 +1,4 @@ -;;;; $Id: specbot.lisp,v 1.8 2004/10/20 20:21:33 bmastenbrook Exp $ +;;;; $Id: specbot.lisp,v 1.9 2004/10/26 01:38:49 bmastenbrook Exp $ ;;;; $Source: /project/cl-irc/cvsroot/cl-irc/example/specbot.lisp,v $ ;;;; specbot.lisp - an example IRC bot for cl-irc @@ -97,7 +97,9 @@ (source message) (first (arguments message)))) (to-lookup (strip-address (trailing-argument message)))) - (if (and (not (string= to-lookup (trailing-argument message))) + (if (and (or + (string-equal (first (arguments message)) *nickname*) + (not (string= to-lookup (trailing-argument message)))) (member to-lookup '("help" "help?") :test #'string-equal)) (progn (privmsg *connection* destination