* riece-log.el (riece-log-get-directory): Fix for server name and
authorbg66 <bg66>
Mon, 27 Oct 2003 01:59:47 +0000 (01:59 +0000)
committerbg66 <bg66>
Mon, 27 Oct 2003 01:59:47 +0000 (01:59 +0000)
private messages handling.

lisp/ChangeLog
lisp/riece-log.el

index d9bc8ce..b642f96 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-27  OHASHI Akira  <bg66@koka-in.org>
+
+       * riece-log.el (riece-log-get-directory): Fix for server name and
+       private messages handling.
+
 2003-10-26  Daiki Ueno  <ueno@unixuser.org>
 
        * riece-xemacs.el (riece-run-with-idle-timer): Pass an integer to
index b4c801c..84ff244 100644 (file)
@@ -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