diff --git a/ts3-client/core/src/main/java/eu/lixko/ts3j/client/net/ClientStatus.java b/ts3-client/core/src/main/java/eu/lixko/ts3j/client/net/ClientStatus.java index bb50df3..11c6ae1 100644 --- a/ts3-client/core/src/main/java/eu/lixko/ts3j/client/net/ClientStatus.java +++ b/ts3-client/core/src/main/java/eu/lixko/ts3j/client/net/ClientStatus.java @@ -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; }