diff options
| author | EnderKill98 <117233381+EnderKill98@users.noreply.github.com> | 2024-06-16 23:03:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-16 16:03:34 -0500 |
| commit | 350e32d0a9f21103e271e80e63daa5711a78e1d7 (patch) | |
| tree | 00622929e2d7d11c7193a2485b50f111aa3afdec | |
| parent | f9e20fd11e72c836040ad001e80f3385ef60cb53 (diff) | |
| download | azalea-drasl-350e32d0a9f21103e271e80e63daa5711a78e1d7.tar.xz | |
Fix command packets (#155)
* Fix copy&paste mistake from chat command signed packet to chat command packet
* Bugfix
---------
Co-authored-by: EnderKill98 <no@mail.tld>
| -rwxr-xr-x | azalea-client/src/chat.rs | 14 | ||||
| -rwxr-xr-x | azalea-protocol/src/packets/game/serverbound_chat_command_packet.rs | 12 |
2 files changed, 1 insertions, 25 deletions
diff --git a/azalea-client/src/chat.rs b/azalea-client/src/chat.rs index 0dad54bb..1b4b7228 100755 --- a/azalea-client/src/chat.rs +++ b/azalea-client/src/chat.rs @@ -276,19 +276,7 @@ fn handle_send_chat_kind_event( .get(), ChatPacketKind::Command => { // TODO: chat signing - ServerboundChatCommandPacket { - command: content, - timestamp: SystemTime::now() - .duration_since(UNIX_EPOCH) - .expect("Time shouldn't be before epoch") - .as_millis() - .try_into() - .expect("Instant should fit into a u64"), - salt: azalea_crypto::make_salt(), - argument_signatures: vec![], - last_seen_messages: LastSeenMessagesUpdate::default(), - } - .get() + ServerboundChatCommandPacket { command: content }.get() } }; diff --git a/azalea-protocol/src/packets/game/serverbound_chat_command_packet.rs b/azalea-protocol/src/packets/game/serverbound_chat_command_packet.rs index 3c36c505..23a796d8 100755 --- a/azalea-protocol/src/packets/game/serverbound_chat_command_packet.rs +++ b/azalea-protocol/src/packets/game/serverbound_chat_command_packet.rs @@ -1,19 +1,7 @@ -use super::serverbound_chat_packet::LastSeenMessagesUpdate; use azalea_buf::McBuf; -use azalea_crypto::MessageSignature; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] pub struct ServerboundChatCommandPacket { pub command: String, - pub timestamp: u64, - pub salt: u64, - pub argument_signatures: Vec<ArgumentSignature>, - pub last_seen_messages: LastSeenMessagesUpdate, -} - -#[derive(Clone, Debug, McBuf)] -pub struct ArgumentSignature { - pub name: String, - pub signature: MessageSignature, } |
