mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 08:52:42 +00:00
Add forex plugin, stability fixes, and async HTTP dispatch
- Add forex plugin (Frankfurter v2 API) with rate lookups, analysis, DM-based alerts, and daily cron poll. Backfills 1 year of history on startup for moving averages and buy signal scoring. - Fix bot hang caused by SQLite lock contention in reminder polling: rows cursor was held open while writing to the same DB. Collect results first, close cursor, then process. Same fix in milkcarton. - Add sync retry loop so the bot reconnects after network drops instead of silently exiting. StopSync() for clean Ctrl+C shutdown. - Add panic recovery to all dispatch, syncer, and cron paths. - Make all HTTP-calling plugin commands async (goroutines) so a slow or dead external API cannot block the message dispatch pipeline. Affects: lookup, stocks, forex, anime, movies, concerts, gaming, retro, wotd, urls, howami. - Extract DisplayName to Base, add db.Exec helper, convert silent error discards across the codebase. - Fix UNO mercy-kill bug (eliminated bot continues playing), adventure DM nag spam, stats column mismatch, per-call regex/replacer allocs. - Update README: forex commands, Finance section, 47 plugins. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -62,6 +62,7 @@ type HoldemPlayer struct {
|
||||
Bet int64 // committed this street
|
||||
TotalBet int64 // committed this hand
|
||||
State PlayerState
|
||||
HasActed bool // whether the player has voluntarily acted this street
|
||||
TipsEnabled bool
|
||||
SittingOut bool
|
||||
WantsLeave bool
|
||||
@@ -90,8 +91,10 @@ type HoldemGame struct {
|
||||
HandInProgress bool
|
||||
StreetHistory string // action chars for current street (f/c/r/R/a) for CFR policy lookup
|
||||
|
||||
actionTimer *time.Timer
|
||||
warningTimer *time.Timer
|
||||
actionTimer *time.Timer
|
||||
warningTimer *time.Timer
|
||||
idleTimer *time.Timer
|
||||
idleWarningTimer *time.Timer
|
||||
}
|
||||
|
||||
// newShuffledDeck creates a shuffled 52-card deck.
|
||||
@@ -208,6 +211,7 @@ func (g *HoldemGame) playerIdx(uid id.UserID) int {
|
||||
func (g *HoldemGame) resetStreetBets() {
|
||||
for _, p := range g.Players {
|
||||
p.Bet = 0
|
||||
p.HasActed = false
|
||||
}
|
||||
g.CurrentBet = 0
|
||||
g.MinRaise = g.BigBlind
|
||||
|
||||
Reference in New Issue
Block a user