server: handle LoginSuccess_Sig
This commit is contained in:
parent
bd5df45e72
commit
c230070bb4
|
@ -199,6 +199,23 @@ impl Server {
|
|||
Some(rx),
|
||||
));
|
||||
}
|
||||
protocol::packet::Packet::LoginSuccess_Sig(val) => {
|
||||
warn!("Server is running in offline mode");
|
||||
debug!("Login: {} {:?} {:?}", val.username, val.uuid, val.properties);
|
||||
let mut read = conn.clone();
|
||||
let mut write = conn;
|
||||
read.state = protocol::State::Play;
|
||||
write.state = protocol::State::Play;
|
||||
let rx = Self::spawn_reader(read);
|
||||
return Ok(Server::new(
|
||||
protocol_version,
|
||||
forge_mods,
|
||||
val.uuid,
|
||||
resources,
|
||||
Some(write),
|
||||
Some(rx),
|
||||
));
|
||||
}
|
||||
protocol::packet::Packet::LoginDisconnect(val) => {
|
||||
return Err(protocol::Error::Disconnect(val.reason))
|
||||
}
|
||||
|
@ -269,6 +286,13 @@ impl Server {
|
|||
write.state = protocol::State::Play;
|
||||
break;
|
||||
}
|
||||
protocol::packet::Packet::LoginSuccess_Sig(val) => {
|
||||
debug!("Login: {} {:?} {:?}", val.username, val.uuid, val.properties);
|
||||
uuid = val.uuid;
|
||||
read.state = protocol::State::Play;
|
||||
write.state = protocol::State::Play;
|
||||
break;
|
||||
}
|
||||
protocol::packet::Packet::LoginDisconnect(val) => {
|
||||
return Err(protocol::Error::Disconnect(val.reason))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue