Censor player ip when joining
This commit is contained in:
parent
936de8fd0b
commit
b01ecbfe13
@ -225,9 +225,11 @@ impl INode for NetworkManager {
|
||||
&connection.address,
|
||||
Package::Players(sent_players, self_id),
|
||||
);
|
||||
peer.broadcast_reliable(Package::NewPlayer(
|
||||
game.bind().find_player(self_id).unwrap().clone(),
|
||||
));
|
||||
let mut sent_player =
|
||||
game.bind().find_player(self_id).unwrap().clone();
|
||||
sent_player.connection_addr =
|
||||
SocketAddr::from(([0, 0, 0, 0], 0));
|
||||
peer.broadcast_reliable(Package::NewPlayer(sent_player));
|
||||
}
|
||||
}
|
||||
teanet::PeerMessage::Disconnected(connection, connection_error) => {
|
||||
@ -283,7 +285,7 @@ impl INode for NetworkManager {
|
||||
}
|
||||
Err(err) => {
|
||||
cli.bind_mut()
|
||||
.publish_message(format!("Error: {}", err), CliColor::Info);
|
||||
.publish_message(format!("Error: {}", err), CliColor::Error);
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user