kunt

golang IRC bot
git clone git://git.2f30.org/kunt.git
Log | Files | Refs | LICENSE

commit 190effea17be56cb9c638c81c52c56f76d0d65c4
parent d8d5dc1df935c0dc33aee59b9743b21f1b24287a
Author: sin <sin@2f30.org>
Date:   Sat May 11 19:20:00 +0100

hangman updates

Diffstat:
src/games/hangman.go | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/games/hangman.go b/src/games/hangman.go @@ -59,7 +59,7 @@ func hangmanInit(cs *hangmanState) { // Second hangman state. It waits on a private query for the goal and then emits the next state (hangmanMainLoop) // to the state channel. func hangmanWaitGoal(cs *hangmanState) { - cs.ictx.Privmsg(cs.channame, "Hangman is waiting for goal. When ready use hangman <letter|possibleword>") + cs.ictx.Privmsg(cs.channame, "Hangman is waiting for goal. When ready use hangman <letter|possibleword>.") for msg := range *cs.gchan { msg.Args[1] = strings.TrimSpace(msg.Args[1]) if msg.Args[0] == cs.botname { @@ -101,7 +101,7 @@ func hangmanMainLoop(cs *hangmanState) { cs.ictx.Privmsg(msg.Args[0], "You are hanged! Goal was ->"+cs.goal) *cs.statchan <- hangmanEnd } - if strings.HasPrefix(msg.Args[1], "hangman ") { + if strings.HasPrefix(msg.Args[1], "hangman") { in := msg.Args[1][8:] if len(in) > 1 { if in == cs.goal {