mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 00:42:49 +08:00
TS2: parse channel delete id as u16, surface server refusals (0xff9a)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
1 parent
6cce28aa9d
commit
83877aaa76
1 file changed
+5
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user