From 1dad15698845d370e998f7cc5feb8aece3fab58f Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 16 Sep 2026 17:05:17 -0400 Subject: refactor: remove dead code, consolidate save/error handling, add lint gate --- internal/game/cmd_quit.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/game/cmd_quit.go') 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() -- cgit v1.2.3