mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-03 01:42:50 +08:00
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:
1 parent
234feb4d55
commit
8fb6d72957
5 files changed
+182
-21
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user