[cl-irc-cvs] r194 - trunk

ehuelsmann at common-lisp.net ehuelsmann at common-lisp.net
Tue Apr 24 20:24:26 UTC 2007


Author: ehuelsmann
Date: Tue Apr 24 16:24:26 2007
New Revision: 194

Modified:
   trunk/protocol.lisp
Log:
Define fallback functions for the case where the message passed isn't even
a subtype of ctcp-mixin.

Modified: trunk/protocol.lisp
==============================================================================
--- trunk/protocol.lisp	(original)
+++ trunk/protocol.lisp	Tue Apr 24 16:24:26 2007
@@ -1020,9 +1020,21 @@
 (defmethod ctcp-request-p ((message ctcp-mixin))
   (string= (command message) :privmsg))
 
+(defmethod ctcp-request-p (message)
+  ;; If we're not calling the above method, then, obviously
+  ;; this was never a ctcp-thing to start with
+  (declare (ignore message))
+  nil)
+
 (defmethod ctcp-reply-p ((message ctcp-mixin))
   (string= (command message) :notice))
 
+(defmethod ctcp-reply-p (message)
+  (declare (ignore message))
+  ;; If we're not calling the above method, then, obviously
+  ;; this was never a ctcp-thing to start with
+  nil)
+
 (defmethod client-log ((connection connection) (message ctcp-mixin) &optional (prefix ""))
   (let ((stream (client-stream connection)))
     (format stream "~A~A: ~A (~A): ~A~{ ~A~} \"~A\"~%"



More information about the cl-irc-cvs mailing list