+(defun riece-user-button-join-partner ()
+ (interactive)
+ (riece-command-join-partner
+ (get-text-property (point) 'riece-identity)))
+
+(defun riece-user-button-set-operators ()
+ (interactive)
+ (let (group)
+ (if (riece-region-active-p)
+ (save-excursion
+ (riece-button-map-identity-region
+ (region-beginning) (region-end)
+ (lambda (start end)
+ (setq group (cons (get-text-property start 'riece-identity)
+ group)))))
+ (setq group (list (get-text-property (point) 'riece-identity))))
+ (if (setq group
+ (delq nil
+ (mapcar
+ (lambda (identity)
+ (riece-with-server-buffer (riece-identity-server
+ riece-current-channel)
+ (if (and (member
+ (riece-identity-prefix identity)
+ (riece-channel-get-users
+ (riece-identity-prefix
+ riece-current-channel)))
+ (not (member
+ (riece-identity-prefix identity)
+ (riece-channel-get-operators
+ (riece-identity-prefix
+ riece-current-channel)))))
+ identity)))
+ group)))
+ (riece-command-set-operators (mapcar #'riece-identity-prefix group)))))
+
+(defun riece-user-button-set-speakers ()
+ (interactive)
+ (let (group)
+ (if (riece-region-active-p)
+ (save-excursion
+ (riece-button-map-identity-region
+ (region-beginning) (region-end)
+ (lambda (start end)
+ (setq group (cons (get-text-property start 'riece-identity)
+ group)))))
+ (setq group (list (get-text-property (point) 'riece-identity))))
+ (if (setq group
+ (delq nil
+ (mapcar
+ (lambda (identity)
+ (riece-with-server-buffer (riece-identity-server
+ riece-current-channel)
+ (if (and (member
+ (riece-identity-prefix identity)
+ (riece-channel-get-users
+ (riece-identity-prefix
+ riece-current-channel)))
+ (not (member
+ (riece-identity-prefix identity)
+ (riece-channel-get-operators
+ (riece-identity-prefix
+ riece-current-channel))))
+ (not (member
+ (riece-identity-prefix identity)
+ (riece-channel-get-speakers
+ (riece-identity-prefix
+ riece-current-channel)))))
+ identity)))
+ group)))
+ (riece-command-set-speakers (mapcar #'riece-identity-prefix group)))))
+
+(defun riece-user-button-finger ()
+ (interactive)
+ (riece-command-finger
+ (riece-identity-prefix (get-text-property (point) 'riece-identity))))
+
+(defun riece-make-identity-button-map ()