* riece-commands.el (riece-command-change-mode): Don't send ":" to
authorDaiki Ueno <ueno@unixuser.org>
Thu, 10 Jun 2004 09:30:05 +0000 (09:30 +0000)
committerDaiki Ueno <ueno@unixuser.org>
Thu, 10 Jun 2004 09:30:05 +0000 (09:30 +0000)
query a channe mode.
* riece-mode.el (riece-parse-modes): Accept mode spec not
delimited with " " such as "-n+s".

lisp/ChangeLog
lisp/riece-commands.el
lisp/riece-mode.el

index 488e300..fab4685 100644 (file)
@@ -1,3 +1,10 @@
+2004-06-10  Daiki Ueno  <ueno@unixuser.org>
+
+       * 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  <ueno@unixuser.org>
 
        * riece-layout.el (riece-set-window-points): Restore window-point
index 911dee8..3436926 100644 (file)
@@ -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
index 4a77940..81762f3 100644 (file)
@@ -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