commit 5eb66d0c7356f2d1645c39acf10b0d06b34a2401
parent adf6acc901c046b8e9cc14ee7e31faefe4b0a47e
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Fri, 15 Dec 2023 23:35:04 -0500
cleanup
Diffstat:
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go
@@ -918,6 +918,14 @@ END:
time.Sleep(MinTimeAfterGame * time.Second)
// Auto unsit inactive players
+ autoUnsitInactivePlayers(db, g, roomID)
+
+ g.IsGameStarted.Store(false)
+}
+
+func autoUnsitInactivePlayers(db *database.DkfDB, g *PokerGame, roomID RoomID) {
+ roomTopic := roomID.Topic()
+ roomLogsTopic := roomID.LogsTopic()
for idx, p := range g.Players {
playerShallBeBooted := false
if p != nil && p.LastActionTS.Before(g.Ongoing.CreatedAt) {
@@ -934,8 +942,6 @@ END:
}
}
}
-
- g.IsGameStarted.Store(false)
}
func applyGains(db *database.DkfDB, g *PokerGame, playersGain []PlayerGain, mainPot, rake database.PokerChip, roomID RoomID) (winnersStr, winnerHand string) {