aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_quit.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-16 17:05:17 -0400
committerhistoria <[not public]>2026-09-16 17:05:17 -0400
commit1dad15698845d370e998f7cc5feb8aece3fab58f (patch)
tree8d58058782de9f422573e1f8efd5d130ce7d1ce9 /internal/game/cmd_quit.go
parenta6cf03a6ae98e4fb675da25046d148e92bcf7206 (diff)
downloadthehouseoficarus-1dad15698845d370e998f7cc5feb8aece3fab58f.tar.gz
refactor: remove dead code, consolidate save/error handling, add lint gate
Diffstat (limited to 'internal/game/cmd_quit.go')
-rw-r--r--internal/game/cmd_quit.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/game/cmd_quit.go b/internal/game/cmd_quit.go
index 85e3510..e564c7e 100644
--- a/internal/game/cmd_quit.go
+++ b/internal/game/cmd_quit.go
@@ -29,7 +29,7 @@ func (g *Game) doQuit(sess *net.Session) {
// to the round in flight refuses and the quit is aborted, so deliberate
// exits never forfeit a stake or reveal cards mid-hand. Forfeit-on-leave
// stays reserved for genuine disconnects and "quit now".
- if !g.leaveCasinoGames(sess, p) {
+ if !g.leaveCasinoGames(p) {
sess.WriteLine(g.colorize(sess, "warning", "Type \"quit now\" to log out anyway — your bet will be forfeited."))
return
}
@@ -82,7 +82,7 @@ func (g *Game) beginQuitCountdown(sess *net.Session) {
// now — immediately before the disconnect. Settling games only
// pay seated bettors, so this forfeits a mid-round stake.
g.emitCasinoEvents(g.Casino.MarkDisconnected(p.Name))
- g.AccountStore.SaveCharacter(p)
+ g.saveCharacter(p)
g.charsMu.Lock()
delete(g.loggedInChars, p.Name)
g.charsMu.Unlock()