Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
package eu.lixko.ts3j.client.net;
|
||||
|
||||
/**
|
||||
* What the channel tree shows for a client, in the order the official client gives the
|
||||
* states priority: the first that applies wins.
|
||||
* What the channel tree shows for a client, in priority order: the first that applies wins.
|
||||
* Unlike the official client, away outranks muted or disabled speakers and microphone.
|
||||
*/
|
||||
public enum ClientStatus {
|
||||
QUERY,
|
||||
AWAY,
|
||||
SPEAKERS_DISABLED,
|
||||
SPEAKERS_MUTED,
|
||||
MIC_DISABLED,
|
||||
MIC_MUTED,
|
||||
AWAY,
|
||||
COMMANDER_TALKING,
|
||||
COMMANDER,
|
||||
TALKING,
|
||||
@@ -18,11 +18,11 @@ public enum ClientStatus {
|
||||
|
||||
public static ClientStatus of(ClientEntry c) {
|
||||
if (c.isQuery()) return QUERY;
|
||||
if (c.away) return AWAY;
|
||||
if (!c.outputHardware) return SPEAKERS_DISABLED;
|
||||
if (c.outputMuted) return SPEAKERS_MUTED;
|
||||
if (!c.inputHardware) return MIC_DISABLED;
|
||||
if (c.inputMuted) return MIC_MUTED;
|
||||
if (c.away) return AWAY;
|
||||
if (c.channelCommander) return c.talking ? COMMANDER_TALKING : COMMANDER;
|
||||
return c.talking ? TALKING : IDLE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user