* riece-ctcp.el (riece-command-ctcp-action): If the current
[riece] / lisp / riece-ctcp.el
index dfde187..5ea2e8d 100644 (file)
                               (riece-get-identities-on-server (car entry)))
                             riece-server-process-alist)))
           riece-current-channel)
-        (read-string "Action: ")))
+        (let (message)
+          (beginning-of-line)
+          (setq message (buffer-substring (point)
+                                          (progn (end-of-line) (point))))
+          (if (equal message "")
+              (read-string "Action: ")
+            (prog1 (read-from-minibuffer "Action: " (cons message 0))
+              (let ((next-line-add-newlines t))
+                (next-line 1)))))))
   (if (equal action "")
       (error "No action"))
   (riece-send-string (format "PRIVMSG %s :\1ACTION %s\1\r\n"