From fc4409c1c93f9386c023fe3b2c882ba2136c826c Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sat, 28 Sep 2024 20:17:17 +0200 Subject: [PATCH] Add sample message to Jeopardy logic Signed-off-by: Georg Pfuetzenreuter --- wat/bot.go | 1 + 1 file changed, 1 insertion(+) diff --git a/wat/bot.go b/wat/bot.go index 1c582d9..b361137 100644 --- a/wat/bot.go +++ b/wat/bot.go @@ -151,6 +151,7 @@ func (w *WatBot) Msg(m *irc.Message) { isBot, games := w.Bot(m) if isBot { // Jeopardy + // parses a message "Top finishers: (nick1: 1300) (nick2: 1200)" from an authorized Jeopardy game bot if args[0] == "Top" && args[1] == "finishers:" && w.Allowed("jeopardy", games) { // hey, I avoided regex! finisherPrizes := strings.Split(strings.Replace(strings.Replace(strings.Replace(strings.Replace(strings.Join(args[2:], " "), ") (", ";", -1), ": ", ":", -1), "(", "", 1), ")", "", 1), ";")