Implement Jeopardy cashout #18
Loading…
x
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.
b7f2ad6dcdtoe91af7c0f6WIP: 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.
fc4409c1c9to984e86a123Improved this a bit by refactoring the new logic to a separate file and function now.
984e86a123to82534a9030@ -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 thereturneither, similar to the functions in the other file.ab92441200to89ed59a9c7