From 194164a77eb4f2479b94c19e6f0e1278ab608781 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 18 Sep 2026 16:13:49 -0400 Subject: fix: more casino, economy, gameplay, security, and world data hardening gaps --- internal/game/cmd_room_remove.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'internal/game/cmd_room_remove.go') diff --git a/internal/game/cmd_room_remove.go b/internal/game/cmd_room_remove.go index af745fd..77a09b3 100644 --- a/internal/game/cmd_room_remove.go +++ b/internal/game/cmd_room_remove.go @@ -180,7 +180,7 @@ func (g *Game) roomRemove(sess *net.Session, args []string) { sess.WriteLine("Error updating current room YAML.") return } - if err := os.WriteFile(aPath, aData, 0644); err != nil { + if err := writeRoomFile(aPath, aData); err != nil { sess.WriteLine("Error writing current room file.") return } @@ -198,7 +198,9 @@ func (g *Game) roomRemove(sess *net.Session, args []string) { if cPathOK { cData, cerr := yaml.Marshal(cRoom) if cerr == nil { - os.WriteFile(cPath, cData, 0644) + if werr := writeRoomFile(cPath, cData); werr != nil { + sess.WriteLine(fmt.Sprintf("Warning: could not link the opposite exit in room %d: %v", cID, werr)) + } } } -- cgit v1.2.3