From aa44c28c4c7fabf5018976833d9f45f875ec0da5 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 3 Aug 2024 16:11:59 +0200 Subject: update version --- src/main.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index db4d237..12d2cdb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,7 +7,7 @@ use azalea_protocol::{ packets::{ handshaking::{client_intention_packet::ClientIntentionPacket, ServerboundHandshakePacket}, login::ServerboundLoginPacket, - ConnectionProtocol, + ClientIntention, ConnectionProtocol, }, read::read_packet, write::write_packet, @@ -92,11 +92,11 @@ async fn handle_client(config: Arc, sock: TcpStream) -> Result<(), anyho bail!("protocol version unsupported") } match p.intention { - ConnectionProtocol::Status => { + ClientIntention::Status => { handle_status_intent(config, downstream_writer, downstream_reader).await?; return Ok(()); } - ConnectionProtocol::Login => {} + ClientIntention::Login => {} _ => bail!("unsupported intent"), } p @@ -127,6 +127,7 @@ async fn handle_client(config: Arc, sock: TcpStream) -> Result<(), anyho ServerboundLoginPacket::LoginAcknowledged(_) => bail!("wtf?"), ServerboundLoginPacket::Key(_) => bail!("key not supported"), ServerboundLoginPacket::CustomQueryAnswer(_) => bail!("custom query not supported"), + ServerboundLoginPacket::CookieResponse(_) => bail!("cookie response not supported"), }; let upstream = TcpStream::connect(config.backend).await?; @@ -184,7 +185,7 @@ async fn handle_status_intent( protocol_version: config.protocol, hostname: config.backend.ip().to_string(), port: config.backend.port(), - intention: ConnectionProtocol::Status, + intention: ClientIntention::Status, }), &mut upstream_writer, None, -- cgit v1.2.3-70-g09d2