+2004-06-06 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-rdcc.el (riece-command-dcc-send): Replace whitespace with
+ "_".
+ (riece-command-dcc-receive): Convert default filename with
+ convert-standard-filename.
+ (riece-handle-dcc-request): Handle filenames enclosed with "...".
+
2004-06-04 TAKAHASHI Kaoru <kaoru@kaisei.org>
* riece-hangman.el (riece-hangman-word): Check killed-buffer or
(accept-process-output process))
(if (eq (process-status process) 'run)
(let ((address (match-string 1))
- (port (match-string 2)))
+ (port (match-string 2))
+ (filename (file-name-nondirectory file)))
+ (while (string-match "[ \t]+" filename)
+ (setq filename (replace-match "_" nil nil filename)))
(erase-buffer)
(make-local-variable 'riece-rdcc-request-size)
(setq riece-rdcc-request-file file
(riece-send-string
(format "PRIVMSG %s :\1DCC SEND %s %s %s %d\1\r\n"
(riece-identity-prefix user)
- (file-name-nondirectory file)
+ filename
address port
riece-rdcc-request-size)))))))
(error "Invalid number"))
(nth (1- number) riece-rdcc-requests))))
(default-name (expand-file-name
- (nth 1 request) (or riece-rdcc-save-directory
- default-directory))))
+ (convert-standard-filename (nth 1 request))
+ (or riece-rdcc-save-directory
+ default-directory))))
(list request
(expand-file-name
(read-file-name
(let ((case-fold-search t))
(when (and riece-rdcc-enabled
(string-match
- "SEND \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\)"
+ "SEND \\(\\([^ ]+\\)\\|\"\\(.+\\)\"\\) \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\)"
message))
- (let ((file (match-string 1 message))
- (address (match-string 2 message))
- (port (string-to-number (match-string 3 message)))
- (size (string-to-number (match-string 4 message)))
+ (let ((file (or (match-string 2 message)
+ (match-string 3 message)))
+ (address (match-string 4 message))
+ (port (string-to-number (match-string 5 message)))
+ (size (string-to-number (match-string 6 message)))
(buffer (if (riece-channel-p target)
(riece-channel-buffer (riece-make-identity
target riece-server-name))))