* riece-commands.el (riece-command-save-variables): New command.
[riece] / lisp / riece-commands.el
index 116d58a..dcc97b1 100644 (file)
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
@@ -205,7 +205,7 @@ the layout to the selected layout-name."
            "Invite user: "
            (riece-get-users-on-server (riece-current-server-name))
            nil nil nil nil nil t))))
-  (riece-send-string (format "INVITE %s %s\r\n"
+  (riece-send-string (format "INVITE %s :%s\r\n"
                             (riece-identity-prefix user)
                             (riece-identity-prefix riece-current-channel))))
 
@@ -485,6 +485,9 @@ the layout to the selected layout-name."
 
 (defun riece-command-part-channel (target message)
   (let ((process (riece-server-process (riece-identity-server target))))
+    (unless process
+      (error "%s" (substitute-command-keys
+                  "Type \\[riece-command-open-server] to open server.")))
     (riece-send-string (if message
                           (format "PART %s :%s\r\n"
                                   (riece-identity-prefix target)
@@ -732,6 +735,15 @@ If prefix argument ARG is non-nil, toggle frozen status."
     (message "")
     (call-interactively command)))
 
+(eval-when-compile
+  (autoload 'riece-save-variables-files "riece"))
+(defun riece-command-save-variables ()
+  "Save `riece-variables-file'."
+  (interactive)
+  (if (or riece-save-variables-are-dirty
+         (y-or-n-p "No changes made.  Save anyway? "))
+      (riece-save-variables-files)))
+
 (provide 'riece-commands)
 
 ;;; riece-commands.el ends here