Quiz module: Earn points for solved questions.

This commit is contained in:
Andreas Neue
2016-03-20 23:01:04 +01:00
parent cc4050e87e
commit 41164153c8
5 changed files with 72 additions and 32 deletions
+8
View File
@@ -83,6 +83,7 @@ func main() {
}
}()
go Ping(bot)
RegisterHandlers(bot)
bot.HandleLoop()
xlog.Info("Exiting")
@@ -95,6 +96,13 @@ func RegisterHandlers(bot *ircx.Bot) {
bot.HandleFunc(irc.PRIVMSG, PrivmsgHandler)
}
func Ping(bot *ircx.Bot) {
for {
time.Sleep(1 * time.Minute)
bot.Sender.Send(&irc.Message{Command: irc.PING})
}
}
func ConnectHandler(s ircx.Sender, m *irc.Message) {
if *nspass != "" {
xlog.Info("Authenticating with NickServ: %v, %v", *name, *nspass)