* riece-commands.el (riece-command-toggle-away): Check user away
[riece] / lisp / riece-commands.el
index 55c0f23..1b05486 100644 (file)
@@ -241,7 +241,7 @@ the layout to the selected layout-name."
            (if (and riece-current-channel
                     (riece-channel-p (riece-identity-prefix
                                       riece-current-channel)))
-               (cons (riece-format-identity riece-current-channel t)
+               (cons (riece-identity-prefix riece-current-channel)
                      0))))))
   (if (or (not (equal pattern ""))
          (yes-or-no-p "Really want to query LIST without argument? "))
@@ -534,7 +534,10 @@ the layout to the selected layout-name."
 (defun riece-command-toggle-away (&optional message)
   "Mark yourself as being away."
   (interactive
-   (if (and (not (riece-user-get-away (riece-current-nickname)))
+   (if (and (not (riece-with-server-buffer (riece-identity-server
+                                           (riece-current-nickname))
+                  (riece-user-get-away (riece-identity-prefix
+                                        (riece-current-nickname)))))
            (or (null riece-away-message)
                current-prefix-arg))
        (let ((message (read-string "Away message: ")))