From 5eab9d5c3a49f50a3931064b802f41c62677617d Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Thu, 10 Jun 2004 09:30:05 +0000 Subject: [PATCH] * 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". --- lisp/ChangeLog | 7 +++++++ lisp/riece-commands.el | 8 ++++++-- lisp/riece-mode.el | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 488e300..fab4685 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +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 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 -- 2.25.1