* riece-server.el (riece-open-server): Simplify message.
authorueno <ueno>
Sat, 31 May 2003 23:29:48 +0000 (23:29 +0000)
committerueno <ueno>
Sat, 31 May 2003 23:29:48 +0000 (23:29 +0000)
* riece-commands.el (riece-command-open-server): Throw an error
when the server is already opened.

lisp/ChangeLog
lisp/riece-commands.el
lisp/riece-server.el

index 0472c48..f9a5b62 100644 (file)
@@ -1,5 +1,10 @@
 2003-05-31  Daiki Ueno  <ueno@unixuser.org>
 
+       * riece-server.el (riece-open-server): Simplify message.
+
+       * riece-commands.el (riece-command-open-server): Throw an error
+       when the server is already opened.
+
        * riece-filter.el (riece-sentinel): Simplified.
 
        * riece-display.el (riece-user-list-update-buffer): Check the
index f5adb10..15e3a49 100644 (file)
@@ -556,9 +556,11 @@ If prefix argument ARG is non-nil, toggle frozen status."
 (defun riece-command-open-server (server-name)
   (interactive
    (list (completing-read "Server: " riece-server-alist)))
-  (riece-open-server
-   (riece-server-name-to-server server-name)
-   server-name))
+  (if (assoc server-name riece-server-process-alist)
+      (error "%s already opened" server-name)
+    (riece-open-server
+     (riece-server-name-to-server server-name)
+     server-name)))
 
 (defun riece-command-close-server (server-name &optional message)
   (interactive
index d2ae3b6..0bb1eaa 100644 (file)
@@ -104,7 +104,7 @@ the `riece-server-keyword-map' variable."
 
 (defun riece-open-server (server &optional server-name)
   (if server-name
-      (message "Connecting to IRC server %s..." server-name)
+      (message "Connecting to %s..." server-name)
     (message "Connecting to IRC server..."))
   (riece-server-keyword-bind server
     (let* (selective-display
@@ -145,7 +145,7 @@ the `riece-server-keyword-map' variable."
                      riece-server-process-alist))
        (setq riece-server-process process))))
   (if server-name
-      (message "Connecting to IRC server %s...done" server-name)
+      (message "Connecting to %s...done" server-name)
     (message "Connecting to IRC server...done")))
 
 (defun riece-reset-process-buffer (process)