* riece-options.el (riece-saved-forms): Add riece-layout.
[riece] / lisp / riece-commands.el
index f48effa..580e77a 100644 (file)
   "Select a layout-name from all current available layouts and change
 the layout to the selected layout-name."
   (interactive (list (completing-read "Layout: " riece-layout-alist)))
-  (setq riece-layout name)
+  (setq riece-layout name
+       riece-save-variables-are-dirty t)
   (riece-command-configure-windows))
 
 (defun riece-command-toggle-channel-buffer-mode ()
@@ -399,6 +400,25 @@ the layout to the selected layout-name."
   (let ((next-line-add-newlines t))
     (next-line 1)))
 
+(defun riece-command-enter-message-to-user (user)
+  "Send the current line to USER."
+  (interactive
+   (let ((completion-ignore-case t))
+     (list (completing-read
+           "User: "
+           (mapcar #'list (riece-get-users-on-server))))))
+  (let ((text (buffer-substring
+              (riece-line-beginning-position)
+              (riece-line-end-position))))
+    (riece-send-string
+     (format "PRIVMSG %s :%s\r\n" user text))
+    (riece-display-message
+     (riece-make-message (riece-current-nickname)
+                        (riece-make-identity user (riece-current-server-name))
+                        text nil t)))
+  (let ((next-line-add-newlines t))
+    (next-line 1)))
+
 (defun riece-command-join-channel (target key)
   (let ((process (riece-server-process (riece-identity-server target))))
     (unless process