From 0613cd8dc1478338f3001cc361cc11da2f05ee86 Mon Sep 17 00:00:00 2001 From: Maxicarlos08 Date: Wed, 6 Sep 2023 17:54:43 +0200 Subject: [PATCH] Changelog entry --- CHANGELOG.md | 1 + server/src/state_ext.rs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6d9bcc916..f80d0b98cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed wild roaming cyclop loot table to not drop the quarry key - Dungeons now have an outer wall, preventing them from intersecting with caves or leaving holes in sides of mountains. - Location names are displayed in character selection dialog +- You can no longer write messages to old groups after being kicked and not having updated your chat mode. ## [0.15.0] - 2023-07-01 diff --git a/server/src/state_ext.rs b/server/src/state_ext.rs index 25672f1bd6..a1f082ff82 100644 --- a/server/src/state_ext.rs +++ b/server/src/state_ext.rs @@ -913,9 +913,6 @@ impl StateExt for State { let is_within = |target, a: &comp::Pos, b: &comp::Pos| a.0.distance_squared(b.0) < target * target; - let id_maps = ecs.read_resource::(); - let entity_from_uid = |uid| id_maps.uid_entity(uid); - let group_manager = ecs.read_resource::(); let group_info = msg.get_group().and_then(|g| group_manager.group_info(*g)); @@ -924,6 +921,9 @@ impl StateExt for State { .clone() .map_group(|_| group_info.map_or_else(|| "???".to_string(), |i| i.name.clone())); + let id_maps = ecs.read_resource::(); + let entity_from_uid = |uid| id_maps.uid_entity(uid); + if msg.chat_type.uid().map_or(true, |sender| { entity_from_uid(sender).map_or(false, |e| { self.validate_chat_msg(