Implement Jeopardy cashout #18
No reviewers
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: LibertaCasa/watbot#18
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "jeopardy"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This depends on #14, which should be reviewed and merged first. Afterwards the patch here can be rebased and marked as ready.
This adds integration between Watbot and the Limnoria Jeopardy plugin. If a game of Jeopardy ends, Watbot will parse the finishers message and pay a small share of the Jeopardy price money in the form of Watcoins. To avoid abuse, only Jeopardy finishing messages from authorized bots are considered. An IRC user is considered an authorized bot if the hostmask matches one of the configured bot hostmasks, and if the nickname is configured for “jeopardy” in the newly introduced bot games configuration.
b7f2ad6dcd
toe91af7c0f6
WIP: Implement Jeopardy cashoutto Implement Jeopardy cashoutThe parsing could be done nicer by having katyusha send a special JSON formatted PRIVMSG with the information to watbot, but I think the slightly unorthodox parsing logic here still outweighs having to fork and modify the Limnoria plugin.
fc4409c1c9
to984e86a123
Improved this a bit by refactoring the new logic to a separate file and function now.
984e86a123
to82534a9030
@ -0,0 +40,4 @@
}
func (w *WatIntegration) HandleIntegration(m *irc.Message, msgargs []string) bool {
empty line not needed here, right?
Good point, the other functions do not have it either.
@ -0,0 +49,4 @@
return true
}
}
I think here neither.
I would prefer to have it here for better structure, but I get
Bot()
does not separate thereturn
either, similar to the functions in the other file.ab92441200
to89ed59a9c7