From bbd7aeff2adc342f63b4565ce77d5c1ce206862a Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 30 Dec 2019 20:31:51 -0400 Subject: [PATCH] clean up --- src/ship/ship.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ship/ship.rs b/src/ship/ship.rs index 795c12e..6e7002f 100644 --- a/src/ship/ship.rs +++ b/src/ship/ship.rs @@ -317,11 +317,8 @@ impl ShipServerState { } fn player_chat(&mut self, id: ClientId, msg: &PlayerChat) -> Box> { - let mut cmsg = PlayerChat::new(0, 0, String::new()); let client = self.clients.get_mut(&id).ok_or(ShipError::ClientNotFound(id)).unwrap(); - cmsg.padding = 0x00010000; - cmsg.guildcard = client.user.guildcard.unwrap(); - cmsg.message.push_str(msg.message.as_str()); + let mut cmsg = PlayerChat::new(0x00010000, client.user.guildcard.unwrap(), msg.message.clone()); let mut mlen = (cmsg.message.len() * 2) + 0x12; while mlen & 0x07 != 0 { cmsg.message.push('\0');