From: Daiki Ueno Date: Mon, 17 Jul 2006 00:21:48 +0000 (+0000) Subject: * riece-commands.el (riece-command-join-channel): Simplified by X-Git-Url: http://cgit.sxemacs.org/?p=riece;a=commitdiff_plain;h=05376a663742b5fc7a7eeac9a2d2d5800320cc2a;hp=e6880f63103375b00851a6c4172a244021c9f1d6 * riece-commands.el (riece-command-join-channel): Simplified by using riece-server-opened. (riece-command-part-channel): Ditto. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c6b2e50..b6abd5b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2006-07-17 Daiki Ueno + + * riece-commands.el (riece-command-join-channel): Simplified by + using riece-server-opened. + (riece-command-part-channel): Ditto. + 2006-07-16 Daiki Ueno * riece.el (riece-save-variables-files): Place ";;; Do not edit diff --git a/lisp/riece-commands.el b/lisp/riece-commands.el index 9aaec0b..84bffe8 100644 --- a/lisp/riece-commands.el +++ b/lisp/riece-commands.el @@ -443,17 +443,16 @@ the layout to the selected layout-name." (next-line 1))) (defun riece-command-join-channel (target key) - (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 key - (format "JOIN %s :%s\r\n" - (riece-identity-prefix target) - key) - (format "JOIN %s\r\n" - (riece-identity-prefix target))) - target))) + (unless (riece-server-opened (riece-identity-server target)) + (error "%s" (substitute-command-keys + "Type \\[riece-command-open-server] to open server."))) + (riece-send-string (if key + (format "JOIN %s :%s\r\n" + (riece-identity-prefix target) + key) + (format "JOIN %s\r\n" + (riece-identity-prefix target))) + target)) (defun riece-command-join-partner (target) (let ((pointer (riece-identity-member target riece-current-channels))) @@ -484,17 +483,16 @@ the layout to the selected layout-name." (riece-command-join-partner 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) - message) - (format "PART %s\r\n" - (riece-identity-prefix target))) - target))) + (unless (riece-server-opened (riece-identity-server target)) + (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) + message) + (format "PART %s\r\n" + (riece-identity-prefix target))) + target)) (defun riece-command-part (target &optional message) (interactive