From: bg66 Date: Mon, 27 Oct 2003 01:59:47 +0000 (+0000) Subject: * riece-log.el (riece-log-get-directory): Fix for server name and X-Git-Tag: riece-0_1_6~13 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=e9f65430b8ca346b976695c31ae93cf2d809ae50;p=elisp%2Friece.git * riece-log.el (riece-log-get-directory): Fix for server name and private messages handling. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d9bc8ce..b642f96 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2003-10-27 OHASHI Akira + + * riece-log.el (riece-log-get-directory): Fix for server name and + private messages handling. + 2003-10-26 Daiki Ueno * riece-xemacs.el (riece-run-with-idle-timer): Pass an integer to diff --git a/lisp/riece-log.el b/lisp/riece-log.el index b4c801c..84ff244 100644 --- a/lisp/riece-log.el +++ b/lisp/riece-log.el @@ -77,24 +77,21 @@ If integer, flash back only this line numbers. t means all lines." (riece-log-get-directory identity))) (defun riece-log-get-directory (identity) - (let ((channel (riece-identity-prefix identity)) - (server (riece-identity-server identity))) - (let ((map (assoc channel riece-log-directory-map))) - (if map - (expand-file-name (cdr map) riece-log-directory) - (if (string-match riece-channel-regexp channel) - (let ((name (substring channel - (match-end 1) (match-beginning 2))) - (suffix (match-string 2 channel))) - (when (and (stringp suffix) - (string-match "^:\\*\\.\\(.*\\)" suffix)) - (setq name (concat name "-" (match-string 1 suffix)))) - (if server - (expand-file-name - name - (expand-file-name server riece-log-directory)) - (expand-file-name name riece-log-directory))) - riece-log-directory))))) + (let* ((channel (riece-identity-prefix identity)) + (server (riece-identity-server identity)) + (map (assoc channel riece-log-directory-map)) + name) + (cond (map (setq name (cdr map))) + ((string-match riece-channel-regexp channel) + (let ((suffix (match-string 2 channel))) + (setq name (substring channel (match-end 1) (match-beginning 2))) + (when (and (stringp suffix) + (string-match "^:\\*\\.\\(.*\\)" suffix)) + (setq name (concat name "-" (match-string 1 suffix)))))) + (t (setq name "priv"))) + (if server + (expand-file-name name (expand-file-name server riece-log-directory)) + (expand-file-name name riece-log-directory)))) (defun riece-log-flashback (identity) (when riece-log-flashback