Add client move/DnD, ServerQuery favorite toggle, and TeaSpeak poke handling.

Lets users move clients via context menu or drag-and-drop (including spacers), show ServerQuery clients per favorite without reconnecting, and surface TeaSpeak/GTS notifyclientpoke reliably via connector fallback plus tsclientlib parse fallthrough.

EOF

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Nico B.andCursor committed 2026-09-06 02:09:52 +02:00
1 parent bf85173a54
commit b6448e65e8
11 files changed
+428 -28

No files matched your search

+8
View File
@@ -138,6 +138,14 @@ wss.on("connection", (socket: WebSocket) => {
}
break;
}
case "moveClient": {
const clientId = Number(msg.clientId);
const channelId = Number(msg.channelId);
if (Number.isFinite(clientId) && Number.isFinite(channelId)) {
await connection?.moveClient(clientId, channelId, msg.channelPassword);
}
break;
}
case "sendChatMessage": {
await connection?.sendChatMessage(msg.message);
break;
+12
View File
@@ -37,6 +37,8 @@ export interface ClientInfo {
channelGroup: number;
serverGroups: number[];
hasTalkPower: boolean;
/** ServerQuery client; UI may hide these unless enabled per favorite. */
isQuery: boolean;
}
export interface GroupEntry {
@@ -252,6 +254,7 @@ export class Ts3Connection {
channel_group: number;
server_groups: number[];
has_talk_power: boolean;
is_query?: boolean;
}
interface RawChannelInfo {
@@ -424,6 +427,7 @@ export class Ts3Connection {
channelGroup: c.channel_group,
serverGroups: c.server_groups,
hasTalkPower: c.has_talk_power,
isQuery: Boolean(c.is_query),
})),
ownClientId: event.own_client_id ?? 0,
serverMaxClients: event.server_max_clients ?? 0,
@@ -550,6 +554,14 @@ export class Ts3Connection {
this.child?.stdin.write(`switch ${id}${passwordArg}\n`);
}
async moveClient(clientId: number, channelId: number, channelPassword?: string): Promise<void> {
const clid = Number(clientId);
const cid = Number(channelId);
if (!Number.isFinite(clid) || !Number.isFinite(cid)) return;
const passwordArg = channelPassword ? ` ${Buffer.from(channelPassword, "utf8").toString("base64")}` : "";
this.child?.stdin.write(`moveclient ${clid} ${cid}${passwordArg}\n`);
}
async getClientConnectionInfo(clientId: number): Promise<void> {
this.child?.stdin.write(`clientconninfo ${clientId}\n`);
}