Compare commits

..

2 Commits

Author SHA1 Message Date
ab92441200
Explain Jeopardy finishers parsing
Elaborate as the convoluted logic can be difficult to understand.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2024-10-01 20:55:33 +02:00
82534a9030
Refactor integrations
Move to a separate file for better code structure and to avoid huge
branching inside Msg().

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2024-09-29 14:45:03 +02:00

View File

@ -40,6 +40,7 @@ func (w *WatIntegration) Bot(m *irc.Message) (bool, []string) {
}
func (w *WatIntegration) HandleIntegration(m *irc.Message, msgargs []string) bool {
isBot, games := w.Bot(m)
if isBot {
// handles a message "Top finishers: (nick1: 1300) (nick2: 1200)" from an authorized Jeopardy game bot
@ -48,6 +49,7 @@ func (w *WatIntegration) HandleIntegration(m *irc.Message, msgargs []string) boo
return true
}
}
// not an authorized bot or no integration matched the given message
return false
}