Compare commits

..

2 Commits

Author SHA1 Message Date
89ed59a9c7
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-02 20:03:56 +02:00
d06e724f06
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-10-02 20:03:56 +02:00

View File

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