Implement Nachrichten options panel: named away-message presets + disconnect message

Wires up the previously placeholder-only "Nachrichten" options section: users can now save/delete named away-message templates and set a default leave message that's sent to the server (via DisconnectOptions) when disconnecting.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
MoepchiandClaude Sonnet 5 committed 2026-07-30 23:22:08 +02:00
1 parent 234feb4d55
commit 8fb6d72957
5 files changed
+182 -21

No files matched your search

+3 -2
View File
@@ -245,9 +245,10 @@ export class Ts3Connection {
this.child?.stdin.write(`muteoutput ${muted ? "1" : "0"}\n`);
}
async disconnect(): Promise<void> {
async disconnect(message = ""): Promise<void> {
if (this.child && !this.child.killed) {
this.child.stdin.write("disconnect\n");
const sanitized = message.replace(/[\r\n]+/g, " ").trim();
this.child.stdin.write(`disconnect ${sanitized}\n`);
this.child.stdin.end();
}
this.listeners.clear();