diff options
Diffstat (limited to 'internal/admin/api_rooms.go')
| -rw-r--r-- | internal/admin/api_rooms.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/admin/api_rooms.go b/internal/admin/api_rooms.go index 3c96d53..01b7b9a 100644 --- a/internal/admin/api_rooms.go +++ b/internal/admin/api_rooms.go @@ -320,6 +320,11 @@ func (s *AdminServer) handleRoomByID(w http.ResponseWriter, r *http.Request) { s.world.RebuildRoomIndex(s.dataDir) s.world.ClearRoomState(id) + // Drop any cached in-room games (tables/machines) and refund their + // outstanding wagers — same eviction semantics as bulk delete. + if s.evictRoom != nil { + s.evictRoom(id) + } allIDs, _ := listRoomIDs(s.dataDir) var extraFiles []ExtraFile @@ -1178,6 +1183,9 @@ func (s *AdminServer) handleResolveDuplicate(w http.ResponseWriter, r *http.Requ return } s.world.RebuildRoomIndex(s.dataDir) + // No casino eviction: a duplicate-ID file was never in the room index, + // so no cached game is keyed to it (games are keyed by the indexed + // room's ID, which survives here untouched). s.undoStack.Push(ChangeDesc{ Description: fmt.Sprintf("delete duplicate room file %s", body.Path), FilePath: absPath, |
