Update of /project/cl-irc/cvsroot/cl-irc/example In directory common-lisp.net:/home/lisppaste/cl-irc/example
Modified Files: cliki-bot.asd cliki.lisp Added Files: steel-bazooka.lisp words Log Message: For bmastenbrook: Steel Bazooka Common Lisp!
Date: Thu Oct 13 20:22:40 2005 Author: lisppaste
Index: cl-irc/example/cliki-bot.asd diff -u cl-irc/example/cliki-bot.asd:1.4 cl-irc/example/cliki-bot.asd:1.5 --- cl-irc/example/cliki-bot.asd:1.4 Tue May 10 02:36:26 2005 +++ cl-irc/example/cliki-bot.asd Thu Oct 13 20:22:38 2005 @@ -1,4 +1,4 @@ -;;;; $Id: cliki-bot.asd,v 1.4 2005/05/10 00:36:26 lisppaste Exp $ +;;;; $Id: cliki-bot.asd,v 1.5 2005/10/13 18:22:38 lisppaste Exp $ ;;;; $Source: /project/cl-irc/cvsroot/cl-irc/example/cliki-bot.asd,v $
;;;; See the LICENSE file for licensing information. @@ -19,7 +19,7 @@ :depends-on (:cl-irc :cl-ppcre :split-sequence :trivial-http) :properties ((#:author-email . "cl-irc-devel@common-lisp.net") - (#:date . "$Date: 2005/05/10 00:36:26 $") + (#:date . "$Date: 2005/10/13 18:22:38 $") ((#:albert #:output-dir) . "doc/api-doc/") ((#:albert #:formats) . ("docbook")) ((#:albert #:docbook #:template) . "book") @@ -28,5 +28,6 @@ :components ((:file "mp2eliza") (:file "eliza-rules" :depends-on ("mp2eliza")) + (:file "steel-bazooka") (:file "cliki" - :depends-on ("mp2eliza")))) + :depends-on ("mp2eliza" "steel-bazooka"))))
Index: cl-irc/example/cliki.lisp diff -u cl-irc/example/cliki.lisp:1.32 cl-irc/example/cliki.lisp:1.33 --- cl-irc/example/cliki.lisp:1.32 Thu Sep 1 21:05:30 2005 +++ cl-irc/example/cliki.lisp Thu Oct 13 20:22:38 2005 @@ -1,4 +1,4 @@ -;;;; $Id: cliki.lisp,v 1.32 2005/09/01 19:05:30 lisppaste Exp $ +;;;; $Id: cliki.lisp,v 1.33 2005/10/13 18:22:38 lisppaste Exp $ ;;;; $Source: /project/cl-irc/cvsroot/cl-irc/example/cliki.lisp,v $
;;;; cliki.lisp - CLiki as an infobot; only works on SBCL. @@ -675,6 +675,13 @@ (let ((str (nth-value 1 (scan-to-strings "^(?i)advice\W+(\d+)$" first-pass)))) (and str (lookup-advice (elt str 0)))) + (let ((str (nth-value 1 (scan-to-strings "^(?i)what\s+does\s+([a-zA-Z]+)\s+(mean|stand\s+for)$" first-pass)))) + (and str + (let ((letters (elt str 0))) + (if (and (> (length letters) 2) + (string-equal (subseq letters (- (length letters) 2)) "cl")) + (steel-bazooka:steel-whatever :letters (string-downcase (subseq letters 0 (- (length letters) 2)))) + (steel-bazooka:steel-whatever :letters (string-downcase letters) :suffix nil))))) (let ((str (nth-value 1 (scan-to-strings "^(?i)shorten\s+(\w+://.+\S)\s*$" term-with-question)))) (and str (shorten (elt str 0))))