mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
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>
This commit is contained in:
parent
f9e20fd11e
commit
350e32d0a9
2 changed files with 1 additions and 25 deletions
|
@ -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()
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue