Set and delete our avatar from the Self menu and the avatar's menu
As in TeamSpeak 3, Self offers "Set avatar…", which picks an image and uploads it, and "Delete avatar" while we have one; the old avatar dialog is gone. Setting (and stealing) is offered only while the server grants i_client_max_avatar_filesize. Right-clicking our own avatar in the info panel offers the same two beside saving it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -383,6 +383,20 @@ public final class ServerSession {
|
||||
return !model.hasPermissionNames() || model.selfPermissionValue("b_client_ban_list") > 0;
|
||||
}
|
||||
|
||||
/** Whether the server lets us upload an avatar ({@code i_client_max_avatar_filesize}); offered while unknown. */
|
||||
public boolean canSetAvatar() {
|
||||
if (!conn.isConnected()) return false;
|
||||
ServerModel model = conn.getModel();
|
||||
return !model.hasPermissionNames() || model.selfPermissionValue("i_client_max_avatar_filesize") > 0;
|
||||
}
|
||||
|
||||
/** Whether we publish an avatar on this server. */
|
||||
public boolean hasAvatar() {
|
||||
if (!conn.isConnected()) return false;
|
||||
ClientEntry self = conn.getModel().getClient(conn.getSelfClientId());
|
||||
return self != null && !self.avatarFlag.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether we have any {@code i_client_move_power}; whether it beats a client's needed
|
||||
* move power only the server knows, so it is left to refuse.
|
||||
|
||||
Reference in New Issue
Block a user