From fb4bc74aba5ea443686fd11d2a19b5bf9b9b3159 Mon Sep 17 00:00:00 2001 From: ueno Date: Sat, 31 May 2003 23:29:48 +0000 Subject: [PATCH] * riece-server.el (riece-open-server): Simplify message. * riece-commands.el (riece-command-open-server): Throw an error when the server is already opened. --- lisp/ChangeLog | 5 +++++ lisp/riece-commands.el | 8 +++++--- lisp/riece-server.el | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0472c48..f9a5b62 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2003-05-31 Daiki Ueno + * 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 diff --git a/lisp/riece-commands.el b/lisp/riece-commands.el index f5adb10..15e3a49 100644 --- a/lisp/riece-commands.el +++ b/lisp/riece-commands.el @@ -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 diff --git a/lisp/riece-server.el b/lisp/riece-server.el index d2ae3b6..0bb1eaa 100644 --- a/lisp/riece-server.el +++ b/lisp/riece-server.el @@ -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) -- 1.7.10.4