X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lisp%2Friece-commands.el;h=f924e5142ecb4e343ca37ef0dcf56df92d70b333;hb=d46659ca66fb4c47cafc244aa3a3dbf76ad10fa8;hp=2fd4d8b40a501cac673c7211b7caf167cfbc194f;hpb=685b2c02a88230e7e70c3f672ef3431a174a99b2;p=elisp%2Friece.git diff --git a/lisp/riece-commands.el b/lisp/riece-commands.el index 2fd4d8b..f924e51 100644 --- a/lisp/riece-commands.el +++ b/lisp/riece-commands.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: @@ -144,6 +144,13 @@ the layout to the selected layout-name." riece-save-variables-are-dirty t) (riece-command-configure-windows)) +(defun riece-command-toggle-others-buffer-mode () + (interactive) + (setq riece-others-buffer-mode + (not riece-others-buffer-mode) + riece-save-variables-are-dirty t) + (riece-command-configure-windows)) + (defun riece-command-toggle-user-list-buffer-mode () (interactive) (setq riece-user-list-buffer-mode @@ -187,7 +194,8 @@ the layout to the selected layout-name." 0))))) (riece-send-string (format "TOPIC %s :%s\r\n" (riece-identity-prefix riece-current-channel) - topic))) + topic) + riece-current-channel)) (defun riece-command-invite (user) (interactive @@ -197,7 +205,7 @@ the layout to the selected layout-name." "Invite user: " (riece-get-users-on-server (riece-current-server-name)) nil nil nil nil nil t)))) - (riece-send-string (format "INVITE %s %s\r\n" + (riece-send-string (format "INVITE %s :%s\r\n" (riece-identity-prefix user) (riece-identity-prefix riece-current-channel)))) @@ -220,7 +228,8 @@ the layout to the selected layout-name." user message) (format "KICK %s %s\r\n" (riece-identity-prefix riece-current-channel) - user)))) + user)) + riece-current-channel)) (defun riece-command-names (pattern) (interactive @@ -378,14 +387,16 @@ the layout to the selected layout-name." (riece-send-string (format "NOTICE %s :%s\r\n" (riece-identity-prefix riece-current-channel) - message)) + message) + riece-current-channel) (riece-display-message (riece-make-message (riece-current-nickname) riece-current-channel message 'notice t))) (riece-send-string (format "PRIVMSG %s :%s\r\n" (riece-identity-prefix riece-current-channel) - message)) + message) + riece-current-channel) (riece-display-message (riece-make-message (riece-current-nickname) riece-current-channel message nil t)))) @@ -424,7 +435,8 @@ the layout to the selected layout-name." (riece-line-beginning-position) (riece-line-end-position)))) (riece-send-string - (format "PRIVMSG %s :%s\r\n" (riece-identity-prefix user) text)) + (format "PRIVMSG %s :%s\r\n" (riece-identity-prefix user) text) + user) (riece-display-message (riece-make-message (riece-current-nickname) user text nil t))) (let ((next-line-add-newlines t)) @@ -435,13 +447,13 @@ the layout to the selected layout-name." (unless process (error "%s" (substitute-command-keys "Type \\[riece-command-open-server] to open server."))) - (riece-process-send-string process - (if key - (format "JOIN %s :%s\r\n" - (riece-identity-prefix target) - key) - (format "JOIN %s\r\n" - (riece-identity-prefix target)))))) + (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))) @@ -473,15 +485,18 @@ the layout to the selected layout-name." (defun riece-command-part-channel (target message) (let ((process (riece-server-process (riece-identity-server target)))) - (riece-process-send-string process - (if message - (format "PART %s :%s\r\n" - (riece-identity-prefix target) - message) - (format "PART %s\r\n" - (riece-identity-prefix target)))))) - -(defun riece-command-part (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))) + +(defun riece-command-part (target &optional message) (interactive (progn (riece-check-channel-commands-are-usable)