From 83877aaa76f64974ffe9b9852e4c87260ca51b56 Mon Sep 17 00:00:00 2001 From: Moepchi Date: Thu, 12 Nov 2026 18:22:30 +0000 Subject: [PATCH] TS2: parse channel delete id as u16, surface server refusals (0xff9a) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU --- connector/src/ts2.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/connector/src/ts2.rs b/connector/src/ts2.rs index 9d32fd0..829a069 100644 --- a/connector/src/ts2.rs +++ b/connector/src/ts2.rs @@ -528,8 +528,9 @@ impl Ts2 { } self.encoder = None; } + // Channel deleted: u16 channel id, then the deleting player's u32 id. 0x0073 => { - self.channels.remove(&u32_at(b, 0)); + self.channels.remove(&(u16_at(b, 0) as u32)); } 0x0074 | 0x0075 => { if let Some(c) = self.channels.get_mut(&u32_at(b, 0)) { @@ -537,6 +538,9 @@ impl Ts2 { } } // The server refuses a command (seen for chat without the matching text permission). + // The server refuses a request: function code u16, then a u16 error code + // (seen: 0x012f channel switch into a channel that no longer exists). + 0xff9a => emit(&Event::Error { message: format!("The TeamSpeak 2 server refused this (error {:#x}).", u16_at(b, 2)) }), 0xfc0f => emit(&Event::Error { message: "The TeamSpeak 2 server refused this: you lack the permission.".into() }), 0x0082 => { let from = rpstr(b, 5);