* riece-commands.el (riece-command-part-channel): Signal an error
authorDaiki Ueno <ueno@unixuser.org>
Sat, 19 Nov 2005 00:34:26 +0000 (00:34 +0000)
committerDaiki Ueno <ueno@unixuser.org>
Sat, 19 Nov 2005 00:34:26 +0000 (00:34 +0000)
if TARGET server has not opened.

lisp/ChangeLog
lisp/riece-commands.el

index a6b0767..a0690c3 100644 (file)
@@ -1,5 +1,8 @@
 2005-11-19  Daiki Ueno  <ueno@unixuser.org>
 
 2005-11-19  Daiki Ueno  <ueno@unixuser.org>
 
+       * riece-commands.el (riece-command-part-channel): Signal an error
+       if TARGET server has not opened.
+
        * riece-channel.el: Require 'riece-cache.
        (riece-find-channel): Increase priority of given channel name in
        riece-channel-cache.
        * riece-channel.el: Require 'riece-cache.
        (riece-find-channel): Increase priority of given channel name in
        riece-channel-cache.
index 116d58a..edc349e 100644 (file)
@@ -485,6 +485,9 @@ the layout to the selected layout-name."
 
 (defun riece-command-part-channel (target message)
   (let ((process (riece-server-process (riece-identity-server target))))
 
 (defun riece-command-part-channel (target message)
   (let ((process (riece-server-process (riece-identity-server target))))
+    (unless process
+      (error "%s" (substitute-command-keys
+                  "Type \\[riece-command-open-server] to open server.")))
     (riece-send-string (if message
                           (format "PART %s :%s\r\n"
                                   (riece-identity-prefix target)
     (riece-send-string (if message
                           (format "PART %s :%s\r\n"
                                   (riece-identity-prefix target)