[Cl-irc-cvs] CVS update: cl-irc/command.lisp

Brian Mastenbrook bmastenbrook at common-lisp.net
Tue Jul 27 18:46:53 UTC 2004


Update of /project/cl-irc/cvsroot/cl-irc
In directory common-lisp.net:/home/bmastenbrook/cl-irc

Modified Files:
	command.lisp 
Log Message:
Don't remember

Date: Tue Jul 27 11:46:53 2004
Author: bmastenbrook

Index: cl-irc/command.lisp
diff -u cl-irc/command.lisp:1.5 cl-irc/command.lisp:1.6
--- cl-irc/command.lisp:1.5	Wed Jun  9 11:54:25 2004
+++ cl-irc/command.lisp	Tue Jul 27 11:46:53 2004
@@ -1,4 +1,4 @@
-;;;; $Id: command.lisp,v 1.5 2004/06/09 18:54:25 bmastenbrook Exp $
+;;;; $Id: command.lisp,v 1.6 2004/07/27 18:46:53 bmastenbrook Exp $
 ;;;; $Source: /project/cl-irc/cvsroot/cl-irc/command.lisp,v $
 
 ;;;; See LICENSE for licensing information.
@@ -249,11 +249,13 @@
 
 (defun socket-stream (socket)
   #+sbcl
-  (sb-bsd-sockets:socket-make-stream socket
-                                     :element-type 'character
-                                     :input t
-                                     :output t
-                                     :buffering :none)
+  (values
+   (sb-bsd-sockets:socket-make-stream socket
+                                      :element-type 'character
+                                      :input t
+                                      :output t
+                                      :buffering :none)
+   socket)
   #+openmcl
   socket)
 
@@ -277,18 +279,20 @@
                      (port *default-irc-server-port*)
                      (logging-stream t))
   "Connect to server and return a connection object."
-  (let* ((stream (socket-connect server port))
-         (user (make-user :nickname nickname
-                          :username username
-                          :realname realname))
-         (connection (make-connection :server-stream stream
-                                      :client-stream logging-stream
-                                      :user user
-                                      :server-name server)))
+  (multiple-value-bind (stream socket)
+      (socket-connect server port)
+    (let* ((user (make-user :nickname nickname
+                            :username username
+                            :realname realname))
+           (connection (make-connection :server-stream stream
+                                        :server-socket socket
+                                        :client-stream logging-stream
+                                        :user user
+                                        :server-name server)))
     (nick connection nickname)
     (user- connection (or username nickname) mode (or realname nickname))
     (add-default-hooks connection)
-    connection))
+    connection)))
 
 (defmethod trace- ((connection connection) &optional (target ""))
   (send-irc-message connection :trace nil target))





More information about the cl-irc-cvs mailing list