* riece-rdcc.el (riece-rdcc-send-program): Flush $stdout before
authorDaiki Ueno <ueno@unixuser.org>
Wed, 22 Oct 2003 07:53:43 +0000 (07:53 +0000)
committerDaiki Ueno <ueno@unixuser.org>
Wed, 22 Oct 2003 07:53:43 +0000 (07:53 +0000)
accepting a connection.
(riece-command-dcc-send): Use riece-completing-read-identity; take
an identity object in the 1st argument.
* riece-ndcc.el (riece-command-dcc-send): Use
riece-completing-read-identity; take an identity object in the 1st
argument.

lisp/ChangeLog
lisp/riece-ndcc.el
lisp/riece-rdcc.el

index e41aefd..8dc0a98 100644 (file)
@@ -1,5 +1,13 @@
 2003-10-22  Daiki Ueno  <ueno@unixuser.org>
 
 2003-10-22  Daiki Ueno  <ueno@unixuser.org>
 
+       * riece-rdcc.el (riece-rdcc-send-program): Flush $stdout before
+       accepting a connection.
+       (riece-command-dcc-send): Use riece-completing-read-identity; take
+       an identity object in the 1st argument.
+       * riece-ndcc.el (riece-command-dcc-send): Use
+       riece-completing-read-identity; take an identity object in the 1st
+       argument.
+
        * riece-display.el (riece-update-buffers): Run
        riece-update-buffer-hook.
 
        * riece-display.el (riece-update-buffers): Run
        riece-update-buffer-hook.
 
index dd0553a..0466040 100644 (file)
@@ -92,9 +92,9 @@ Only used for sending files."
    (let ((completion-ignore-case t))
      (unless riece-ndcc-server-address
        (error "Set riece-ndcc-server-address to your host"))
    (let ((completion-ignore-case t))
      (unless riece-ndcc-server-address
        (error "Set riece-ndcc-server-address to your host"))
-     (list (completing-read
+     (list (riece-completing-read-identity
            "User: "
            "User: "
-           (mapcar #'list (riece-get-users-on-server)))
+           (riece-get-users-on-server (riece-current-server-name)))
           (expand-file-name (read-file-name "File: ")))))
   (let* (selective-display
         (coding-system-for-read 'binary)
           (expand-file-name (read-file-name "File: ")))))
   (let* (selective-display
         (coding-system-for-read 'binary)
@@ -111,7 +111,8 @@ Only used for sending files."
                                        :sentinel 'riece-ndcc-server-sentinel))
     (riece-send-string
      (format "PRIVMSG %s :\1DCC SEND %s %s %d %d\1\r\n"
                                        :sentinel 'riece-ndcc-server-sentinel))
     (riece-send-string
      (format "PRIVMSG %s :\1DCC SEND %s %s %d %d\1\r\n"
-            user (file-name-nondirectory file)
+            (riece-identity-prefix user)
+            (file-name-nondirectory file)
             (riece-ndcc-encode-address riece-ndcc-server-address)
             (nth 1 (process-contact process))
             (nth 7 (file-attributes file))))))
             (riece-ndcc-encode-address riece-ndcc-server-address)
             (nth 1 (process-contact process))
             (nth 7 (file-attributes file))))))
index 9328098..ee97197 100644 (file)
@@ -55,6 +55,7 @@ unless address
 end
 server = TCPServer.new(address, 0)
 puts(\"#{server.addr[3].split(/\\./).collect{|c| c.to_i}.pack('CCCC').unpack('N')[0]} #{server.addr[1]}\")
 end
 server = TCPServer.new(address, 0)
 puts(\"#{server.addr[3].split(/\\./).collect{|c| c.to_i}.pack('CCCC').unpack('N')[0]} #{server.addr[1]}\")
+$stdout.flush
 session = server.accept
 if session
   total = 0
 session = server.accept
 if session
   total = 0
@@ -125,9 +126,9 @@ puts(\"#{" address " >> 24 & 0xFF}.#{" address " >> 16 & 0xFF}.#{"
 (defun riece-command-dcc-send (user file)
   (interactive
    (let ((completion-ignore-case t))
 (defun riece-command-dcc-send (user file)
   (interactive
    (let ((completion-ignore-case t))
-     (list (completing-read
+     (list (riece-completing-read-identity
            "User: "
            "User: "
-           (mapcar #'list (riece-get-users-on-server)))
+           (riece-get-users-on-server (riece-current-server-name)))
           (expand-file-name (read-file-name "File: ")))))
   (let* ((process-connection-type nil)
         (process (start-process "DCC" (generate-new-buffer " *DCC*")
           (expand-file-name (read-file-name "File: ")))))
   (let* ((process-connection-type nil)
         (process (start-process "DCC" (generate-new-buffer " *DCC*")
@@ -164,7 +165,8 @@ puts(\"#{" address " >> 24 & 0xFF}.#{" address " >> 16 & 0xFF}.#{"
            (set-process-sentinel process #'riece-rdcc-server-sentinel)
            (riece-send-string
             (format "PRIVMSG %s :\1DCC SEND %s %s %s %d\1\r\n"
            (set-process-sentinel process #'riece-rdcc-server-sentinel)
            (riece-send-string
             (format "PRIVMSG %s :\1DCC SEND %s %s %s %d\1\r\n"
-                    user (file-name-nondirectory file)
+                    (riece-identity-prefix user)
+                    (file-name-nondirectory file)
                     address port
                     riece-rdcc-request-size)))))))
 
                     address port
                     riece-rdcc-request-size)))))))