]> code.delx.au - gnu-emacs/commitdiff
* lisp/net/rcirc.el (rcirc-cmd-quit): Allow quiting all servers with
authorLeo Liu <sdl.web@gmail.com>
Sun, 18 Mar 2012 03:27:28 +0000 (11:27 +0800)
committerLeo Liu <sdl.web@gmail.com>
Sun, 18 Mar 2012 03:27:28 +0000 (11:27 +0800)
prefix.

lisp/ChangeLog
lisp/net/rcirc.el

index 9bdfd5c1b73b952c32a999c7be06cf27d1558a9f..06b273fa178ae26600a96b31e047f1bd5062fa58 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-18  Leo Liu  <sdl.web@gmail.com>
+
+       * net/rcirc.el (rcirc-cmd-quit): Allow quiting all servers with
+       prefix.
+
 2012-03-17  Eli Zaretskii  <eliz@gnu.org>
 
        * textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
index 1c74e6190dc4fdf75b3cae335393f70125e6f9b6..d09b6aa831fc1867a405e07b86275c9a89ea1a3f 100644 (file)
@@ -2165,13 +2165,17 @@ CHANNELS is a comma- or space-separated string of channel names."
   (let ((channel (if (> (length channel) 0) channel target)))
     (rcirc-send-string process (concat "PART " channel " :" rcirc-id-string))))
 
-(defun-rcirc-command quit (reason)
-  "Send a quit message to server with REASON."
-  (interactive "sQuit reason: ")
-  (rcirc-send-string process (concat "QUIT :"
-                                    (if (not (zerop (length reason)))
-                                        reason
-                                      rcirc-id-string))))
+(defun-rcirc-command quit (reason all)
+  "Send a quit message to server with REASON.
+When called with prefix, quit all servers."
+  (interactive "sQuit reason: \nP")
+  (dolist (p (if all
+                (rcirc-process-list)
+              (list process)))
+    (rcirc-send-string p (concat "QUIT :"
+                                (if (not (zerop (length reason)))
+                                    reason
+                                  rcirc-id-string)))))
 
 (defun-rcirc-command nick (nick)
   "Change nick to NICK."