From: ueno Date: Thu, 10 Jun 2004 09:30:06 +0000 (+0000) Subject: * riece-commands.el (riece-command-change-mode): Don't send ":" to X-Git-Tag: riece-1_0_1~18 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=68f27a170336e4cf4a7e43d18a476c026affa79a;p=elisp%2Friece.git * riece-commands.el (riece-command-change-mode): Don't send ":" to query a channe mode. * riece-mode.el (riece-parse-modes): Accept mode spec not delimited with " " such as "-n+s". --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 488e300..fab4685 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,12 @@ 2004-06-10 Daiki Ueno + * riece-commands.el (riece-command-change-mode): Don't send ":" to + query a channe mode. + * riece-mode.el (riece-parse-modes): Accept mode spec not + delimited with " " such as "-n+s". + +2004-06-10 Daiki Ueno + * riece-layout.el (riece-set-window-points): Restore window-point of the channel buffer from riece-channel-buffer-window-point. diff --git a/lisp/riece-commands.el b/lisp/riece-commands.el index 911dee8..3436926 100644 --- a/lisp/riece-commands.el +++ b/lisp/riece-commands.el @@ -275,8 +275,12 @@ the layout to the selected layout-name." (concat (riece-concat-channel-modes channel "Mode (? for help)") ": ") nil riece-minibuffer-map)))) - (riece-send-string (format "MODE %s :%s\r\n" (riece-identity-prefix channel) - change))) + (if (equal change "") + (riece-send-string (format "MODE %s\r\n" + (riece-identity-prefix channel))) + (riece-send-string (format "MODE %s :%s\r\n" + (riece-identity-prefix channel) + change)))) (defun riece-command-set-operators (users &optional arg) (interactive diff --git a/lisp/riece-mode.el b/lisp/riece-mode.el index 4a77940..81762f3 100644 --- a/lisp/riece-mode.el +++ b/lisp/riece-mode.el @@ -27,9 +27,9 @@ (defun riece-parse-modes (string) (let ((start 0) result) - (while (and (string-match "[-+]\\([^ ]*\\) *" string start) + (while (and (string-match "[-+]\\([^-+ ]*\\) *" string start) (= (match-beginning 0) start)) - (let ((toggle (eq (aref string 0) ?+)) + (let ((toggle (eq (aref string start) ?+)) (modes (string-to-list (match-string 1 string)))) (setq start (match-end 0)) (while modes