1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-04-21 23:17:45 +00:00

Add more fields to ChatMessage IPC

This commit is contained in:
Joshua Goins 2025-03-12 19:45:15 -04:00
parent a448df65b4
commit 7c1a3944e9
2 changed files with 11 additions and 5 deletions

View file

@ -450,7 +450,7 @@ async fn main() {
IPCStructData::Disconnected { .. } => {
tracing::info!("Client disconnected!");
}
IPCStructData::ChatMessage { message } => {
IPCStructData::ChatMessage { message, .. } => {
tracing::info!("Client sent chat message: {message}!");
}
_ => panic!(

View file

@ -280,9 +280,15 @@ pub enum IPCStructData {
#[br(pre_assert(*magic == IPCOpCode::ChatMessage))]
ChatMessage {
// TODO: incomplete
#[br(dbg)]
#[brw(pad_before = 26)]
#[brw(pad_after = 998)]
#[brw(pad_before = 4)] // empty
player_id: u32,
#[brw(pad_before = 4)] // empty
timestamp: u32,
#[brw(pad_before = 8)] // NOT empty
channel: u16,
#[br(count = 32)]
#[bw(pad_size_to = 32)]
#[br(map = read_string)]
@ -447,7 +453,7 @@ impl IPCSegment {
IPCStructData::LogOut { .. } => todo!(),
IPCStructData::LogOutComplete { .. } => 8,
IPCStructData::Disconnected { .. } => todo!(),
IPCStructData::ChatMessage { .. } => todo!(),
IPCStructData::ChatMessage { .. } => 1056,
}
}
}