[cl-irc-cvs] CVS cl-irc
ehuelsmann
ehuelsmann at common-lisp.net
Fri Jan 27 21:10:02 UTC 2006
Update of /project/cl-irc/cvsroot/cl-irc
In directory common-lisp:/tmp/cvs-serv2096
Modified Files:
event.lisp protocol.lisp
Log Message:
Patch by Andreas Fuchs [asf at boinkor.net] to allow specialization of
irc-message-event on the type of connection.
--- /project/cl-irc/cvsroot/cl-irc/event.lisp 2006/01/24 22:10:58 1.12
+++ /project/cl-irc/cvsroot/cl-irc/event.lisp 2006/01/27 21:10:02 1.13
@@ -1,16 +1,17 @@
-;;;; $Id: event.lisp,v 1.12 2006/01/24 22:10:58 ehuelsmann Exp $
+;;;; $Id: event.lisp,v 1.13 2006/01/27 21:10:02 ehuelsmann Exp $
;;;; $Source: /project/cl-irc/cvsroot/cl-irc/event.lisp,v $
;;;; See LICENSE for licensing information.
(in-package :irc)
-(defgeneric irc-message-event (message)
+(defgeneric irc-message-event (connection message)
(:documentation "Upon receipt of an IRC message from the
connection's stream, irc-message-event will be called with the
message."))
-(defmethod irc-message-event ((message irc-message))
+(defmethod irc-message-event (connection (message irc-message))
+ (declare (ignore connection))
(apply-to-hooks message)
(client-log (connection message) message "UNHANDLED-EVENT:"))
@@ -286,7 +287,8 @@
(format nil "PING ~A" (trailing-argument message)))
(source message)))
-(defmethod irc-message-event ((message ctcp-dcc-chat-request-message))
+(defmethod irc-message-event (connection (message ctcp-dcc-chat-request-message))
+ (declare (ignore connection))
(apply-to-hooks message)
(client-log (connection message) message))
; (when (automatically-accept-dcc-connections (configuration (connection message)))
@@ -299,7 +301,8 @@
; :remote-port remote-port)
; *dcc-connections*))))
-(defmethod irc-message-event ((message ctcp-dcc-send-request-message))
+(defmethod irc-message-event (connection (message ctcp-dcc-send-request-message))
+ (declare (ignore connection))
(apply-to-hooks message)
(client-log (connection message) message))
; (when (automatically-accept-dcc-downloads (configuration (connection message)))
--- /project/cl-irc/cvsroot/cl-irc/protocol.lisp 2006/01/25 20:22:31 1.30
+++ /project/cl-irc/cvsroot/cl-irc/protocol.lisp 2006/01/27 21:10:02 1.31
@@ -1,4 +1,4 @@
-;;;; $Id: protocol.lisp,v 1.30 2006/01/25 20:22:31 ehuelsmann Exp $
+;;;; $Id: protocol.lisp,v 1.31 2006/01/27 21:10:02 ehuelsmann Exp $
;;;; $Source: /project/cl-irc/cvsroot/cl-irc/protocol.lisp,v $
;;;; See LICENSE for licensing information.
@@ -244,7 +244,7 @@
(let ((message (read-irc-message connection)))
(when *debug-p*
(format *debug-stream* "~A" (describe message)))
- (irc-message-event message)
+ (irc-message-event connection message)
message))) ; needed because of the "loop while" in read-message-loop
(defvar *process-count* 0)
More information about the cl-irc-cvs
mailing list