mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-02 17:32:50 +08:00
Add Whisper Verlauf dialog and complete the Selbst menu
Whisper Verlauf logs outgoing whisper-target changes with timestamps (incoming-whisper detection isn't observable yet, so it's outgoing-only for now). The Selbst menu now wires Abwesend/Mikrofon/Lautsprecher to the existing toolbar actions and adds a real nickname-change flow, backed by a new "nickname" connector command using tsclientlib's existing client_update().set_name().
This commit is contained in:
1 parent
a0ede4a12a
commit
f5cb4dd160
6 files changed
+346
-14
No files matched your search
@@ -114,6 +114,10 @@ wss.on("connection", (socket: WebSocket) => {
|
||||
await connection?.setOutputMuted(msg.muted);
|
||||
break;
|
||||
}
|
||||
case "setNickname": {
|
||||
await connection?.setNickname(msg.nickname);
|
||||
break;
|
||||
}
|
||||
case "setWhisperTargets": {
|
||||
await connection?.setWhisperTargets(msg.channelIds ?? [], msg.clientIds ?? []);
|
||||
break;
|
||||
|
||||
@@ -268,6 +268,11 @@ export class Ts3Connection {
|
||||
this.child?.stdin.write(`muteoutput ${muted ? "1" : "0"}\n`);
|
||||
}
|
||||
|
||||
async setNickname(nickname: string): Promise<void> {
|
||||
const sanitized = nickname.replace(/[\r\n]+/g, " ").trim();
|
||||
if (sanitized) this.child?.stdin.write(`nickname ${sanitized}\n`);
|
||||
}
|
||||
|
||||
/** Empty channelIds/clientIds clears whisper mode, returning outgoing
|
||||
* voice to the normal current-channel broadcast. */
|
||||
async setWhisperTargets(channelIds: number[], clientIds: number[]): Promise<void> {
|
||||
|
||||
Reference in new issue
Block a user