- (if current-prefix-arg
- (let ((message (read-string "Away message: ")))
- (list message))))
- (if message
- (riece-send-string (format "AWAY :%s\r\n" message))
- (riece-send-string "AWAY\r\n")))
+ (if (and (not (riece-with-server-buffer (riece-identity-server
+ (riece-current-nickname))
+ (riece-user-get-away (riece-identity-prefix
+ (riece-current-nickname)))))
+ current-prefix-arg)
+ (list (read-from-minibuffer
+ "Away message: " (cons (or riece-away-message "") 0)))))
+ (if (riece-with-server-buffer (riece-identity-server
+ (riece-current-nickname))
+ (riece-user-get-away (riece-identity-prefix
+ (riece-current-nickname))))
+ (riece-send-string "AWAY\r\n")
+ (riece-send-string (format "AWAY :%s\r\n" (or message
+ riece-away-message)))))