Add sample message to Jeopardy logic
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
parent
e91af7c0f6
commit
fc4409c1c9
@ -151,6 +151,7 @@ func (w *WatBot) Msg(m *irc.Message) {
|
|||||||
isBot, games := w.Bot(m)
|
isBot, games := w.Bot(m)
|
||||||
if isBot {
|
if isBot {
|
||||||
// Jeopardy
|
// 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) {
|
if args[0] == "Top" && args[1] == "finishers:" && w.Allowed("jeopardy", games) {
|
||||||
// hey, I avoided regex!
|
// hey, I avoided regex!
|
||||||
finisherPrizes := strings.Split(strings.Replace(strings.Replace(strings.Replace(strings.Replace(strings.Join(args[2:], " "), ") (", ";", -1), ": ", ":", -1), "(", "", 1), ")", "", 1), ";")
|
finisherPrizes := strings.Split(strings.Replace(strings.Replace(strings.Replace(strings.Replace(strings.Join(args[2:], " "), ") (", ";", -1), ": ", ":", -1), "(", "", 1), ")", "", 1), ";")
|
||||||
|
Loading…
Reference in New Issue
Block a user