[beirc-cvs] CVS beirc

rgoldman rgoldman at common-lisp.net
Fri Apr 21 16:58:58 UTC 2006


Update of /project/beirc/cvsroot/beirc
In directory clnet:/tmp/cvs-serv596

Modified Files:
	application.lisp 
Log Message:
Keep cl-irc:no-such-reply errors from crashing BEIRC.  Unfortunately,
this is only a partial patch; it doesn't work for lisps without
processing.


--- /project/beirc/cvsroot/beirc/application.lisp	2006/04/20 06:39:27	1.79
+++ /project/beirc/cvsroot/beirc/application.lisp	2006/04/21 16:58:58	1.80
@@ -1094,14 +1094,17 @@
         (format stream "\"."))))) 
 
 (defun irc-event-loop (frame connection)
-  (let ((*application-frame* frame))
-    (unwind-protect (irc:read-message-loop connection)
-      (setf (connection-open-p (server-receiver frame connection)) nil)
-      (irc:remove-all-hooks connection)      
-      (irc:irc-message-event connection
-                             (make-fake-irc-message 'irc-connection-closed-message
-                                                    :command "Connnection closed"
-                                                    :source (irc:server-name connection))))))
+  ;; keep unrecognized responses from crashing BEIRC [2006/04/21:rpg]
+  (handler-bind ((cl-irc:no-such-reply #'(lambda (c)
+					   (continue c))))
+    (let ((*application-frame* frame))
+      (unwind-protect (irc:read-message-loop connection)
+	(setf (connection-open-p (server-receiver frame connection)) nil)
+	(irc:remove-all-hooks connection)      
+	(irc:irc-message-event connection
+			       (make-fake-irc-message 'irc-connection-closed-message
+						      :command "Connnection closed"
+						      :source (irc:server-name connection)))))))
 
 ;;; Hack:
 




More information about the Beirc-cvs mailing list