mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'sharp/fix-redundant-code' into 'master'
Removed redundant code missed in auth merge. See merge request veloren/veloren!1404
This commit is contained in:
commit
98c8240879
@ -1,6 +1,5 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
client::Client, persistence::PersistedComponents, settings::ServerSettings,
|
client::Client, persistence::PersistedComponents, sys::sentinel::DeletedEntities, SpawnPoint,
|
||||||
sys::sentinel::DeletedEntities, SpawnPoint,
|
|
||||||
};
|
};
|
||||||
use common::{
|
use common::{
|
||||||
character::CharacterId,
|
character::CharacterId,
|
||||||
@ -192,18 +191,6 @@ impl StateExt for State {
|
|||||||
player.character_id = Some(character_id);
|
player.character_id = Some(character_id);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Give the Admin component to the player if their name exists in admin list
|
|
||||||
if self.ecs().fetch::<ServerSettings>().admins.contains(
|
|
||||||
&self
|
|
||||||
.ecs()
|
|
||||||
.read_storage::<comp::Player>()
|
|
||||||
.get(entity)
|
|
||||||
.expect("Failed to fetch entity.")
|
|
||||||
.alias,
|
|
||||||
) {
|
|
||||||
self.write_component(entity, comp::Admin);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Tell the client its request was successful.
|
// Tell the client its request was successful.
|
||||||
if let Some(client) = self.ecs().write_storage::<Client>().get_mut(entity) {
|
if let Some(client) = self.ecs().write_storage::<Client>().get_mut(entity) {
|
||||||
client.allow_state(ClientState::Character);
|
client.allow_state(ClientState::Character);
|
||||||
|
Loading…
Reference in New Issue
Block a user