[Cl-irc-cvs] CVS update: cl-irc/example/cliki.lisp
Lisppaste and co.
lisppaste at common-lisp.net
Thu Sep 1 19:05:31 UTC 2005
Update of /project/cl-irc/cvsroot/cl-irc/example
In directory common-lisp.net:/home/lisppaste/cl-irc/example
Modified Files:
cliki.lisp
Log Message:
(for bmastenbrook): add a socket-error catch from trivial-sockets; fix a bad regexp which prevented adding terms with quotes in them (like "Bob")
Date: Thu Sep 1 21:05:30 2005
Author: lisppaste
Index: cl-irc/example/cliki.lisp
diff -u cl-irc/example/cliki.lisp:1.31 cl-irc/example/cliki.lisp:1.32
--- cl-irc/example/cliki.lisp:1.31 Tue Aug 9 03:26:14 2005
+++ cl-irc/example/cliki.lisp Thu Sep 1 21:05:30 2005
@@ -1,4 +1,4 @@
-;;;; $Id: cliki.lisp,v 1.31 2005/08/09 01:26:14 lisppaste Exp $
+;;;; $Id: cliki.lisp,v 1.32 2005/09/01 19:05:30 lisppaste Exp $
;;;; $Source: /project/cl-irc/cvsroot/cl-irc/example/cliki.lisp,v $
;;;; cliki.lisp - CLiki as an infobot; only works on SBCL.
@@ -332,6 +332,9 @@
(sb-ext:timeout (c)
(return-from cliki-return (progn (signal 'lookup-failure)
"I can't be expected to work when CLiki doesn't respond to me, can I?")))
+ (trivial-sockets:socket-error (c)
+ (return-from cliki-return (progn (signal 'lookup-failure)
+ "I can't be expected to work when CLiki doesn't respond to me, can I?")))
(serious-condition (c &rest whatever) (return-from cliki-return (progn (signal 'lookup-failure) (regex-replace-all "\\n" (format nil "An error was encountered in lookup: ~A." c) " "))))))
))
@@ -508,7 +511,7 @@
(should-send-cant-find t))
(setf first-pass (regex-replace-all "\\s\\s+" first-pass " "))
(setf first-pass (regex-replace-all "\\s*$" first-pass ""))
- (let ((scanned (or (nth-value 1 (scan-to-strings "^add\\s+\"([^\"]+)\"\\s+as:*\\s+(.+)$" first-pass))
+ (let ((scanned (or (nth-value 1 (scan-to-strings "^add\\s+\"(.+)\"\\s+as:*\\s+(.+)$" first-pass))
(nth-value 1 (scan-to-strings "^add\\s+(.+)\\s+as:*\\s+(.+)$" first-pass)))))
(if scanned
(let ((term (elt scanned 0))
More information about the cl-irc-cvs
mailing list