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