Update of /project/net-nittin-irc/cvsroot/net-nittin-irc In directory common-lisp.net:/tmp/cvs-serv1338
Modified Files: command.lisp protocol.lisp Log Message: conditionalize sb-bsd-socket usage and warn for implementations where function not implemented Date: Tue Dec 16 13:30:32 2003 Author: krosenberg
Index: net-nittin-irc/command.lisp diff -u net-nittin-irc/command.lisp:1.8 net-nittin-irc/command.lisp:1.9 --- net-nittin-irc/command.lisp:1.8 Sun Nov 23 18:21:57 2003 +++ net-nittin-irc/command.lisp Tue Dec 16 13:30:32 2003 @@ -1,4 +1,4 @@ -;;;; $Id: command.lisp,v 1.8 2003/11/23 23:21:57 eenge Exp $ +;;;; $Id: command.lisp,v 1.9 2003/12/16 18:30:32 krosenberg Exp $ ;;;; $Source: /project/net-nittin-irc/cvsroot/net-nittin-irc/command.lisp,v $
;;;; See LICENSE for licensing information. @@ -304,6 +304,7 @@ (send-irc-message connection :privmsg (make-ctcp-message message) target))
(defmethod ctcp-chat-initiate ((connection connection) (nickname string)) + #+sbcl (let ((socket (sb-bsd-sockets:make-inet-socket :stream :tcp)) (port 44347)) (sb-bsd-sockets:socket-bind socket #(127 0 0 1) port) ; arbitrary port @@ -315,4 +316,6 @@ (make-dcc-connection :user (find-user connection nickname) :input-stream t :output-stream (sb-bsd-sockets:socket-make-stream socket :input t :output t :buffering :none) - :socket socket))) + :socket socket)) + #-sbcl (warn "ctcp-chat-initiate is not supported on this implementation.") + )
Index: net-nittin-irc/protocol.lisp diff -u net-nittin-irc/protocol.lisp:1.23 net-nittin-irc/protocol.lisp:1.24 --- net-nittin-irc/protocol.lisp:1.23 Tue Nov 25 08:14:34 2003 +++ net-nittin-irc/protocol.lisp Tue Dec 16 13:30:32 2003 @@ -1,4 +1,4 @@ -;;;; $Id: protocol.lisp,v 1.23 2003/11/25 13:14:34 eenge Exp $ +;;;; $Id: protocol.lisp,v 1.24 2003/12/16 18:30:32 krosenberg Exp $ ;;;; $Source: /project/net-nittin-irc/cvsroot/net-nittin-irc/protocol.lisp,v $
;;;; See LICENSE for licensing information. @@ -211,13 +211,16 @@ (remote-address nil) (remote-port nil) (output-stream t)) + #+sbcl (let ((socket (sb-bsd-sockets:make-inet-socket :stream :tcp))) (sb-bsd-sockets:socket-connect socket remote-address remote-port) (make-instance 'dcc-connection :user user :stream (sb-bsd-sockets:socket-make-stream socket :input t :output t :buffering :none) :socket socket - :output-stream t))) + :output-stream t)) + #-sbcl + (warn "make-dcc-connection not supported for this implementation."))
(defmethod read-message ((connection dcc-connection)) (let ((message (read-line (stream connection)))) @@ -237,7 +240,8 @@ (close (stream connection)) (setf (user connection) nil) (setf *dcc-connections* (remove connection *dcc-connections*)) - (sb-bsd-sockets:socket-close (socket connection))) + #+sbcl (sb-bsd-sockets:socket-close (socket connection)) + )
(defmethod connectedp ((connection dcc-connection)) (let ((stream (stream connection)))
net-nittin-irc-cvs@common-lisp.net