From: ueno Date: Wed, 22 Oct 2003 07:53:43 +0000 (+0000) Subject: * riece-rdcc.el (riece-rdcc-send-program): Flush $stdout before X-Git-Tag: riece-0_1_5~18 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b75185298a15f42a12c853baa69f875186c47e7;p=elisp%2Friece.git * 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e41aefd..8dc0a98 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,13 @@ 2003-10-22 Daiki Ueno + * 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. diff --git a/lisp/riece-ndcc.el b/lisp/riece-ndcc.el index dd0553a..0466040 100644 --- a/lisp/riece-ndcc.el +++ b/lisp/riece-ndcc.el @@ -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")) - (list (completing-read + (list (riece-completing-read-identity "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) @@ -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" - 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)))))) diff --git a/lisp/riece-rdcc.el b/lisp/riece-rdcc.el index 9328098..ee97197 100644 --- a/lisp/riece-rdcc.el +++ b/lisp/riece-rdcc.el @@ -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]}\") +$stdout.flush 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)) - (list (completing-read + (list (riece-completing-read-identity "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*") @@ -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" - user (file-name-nondirectory file) + (riece-identity-prefix user) + (file-name-nondirectory file) address port riece-rdcc-request-size)))))))