Make the deadline configurable
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
|
||||
var (
|
||||
channels = flag.String("channels", "##testing,##test", "Channels to join (separated by comma)")
|
||||
cooldown = flag.Int("cooldown", 120, "Command rate-limit, in seconds")
|
||||
host = flag.String("host", "chat.freenode.net", "Server host[:port]")
|
||||
ident = flag.String("ident", "lysenko", "Lysenko Bot")
|
||||
nick = flag.String("nick", "lysenko", "Lysenko Bot")
|
||||
@@ -71,6 +72,8 @@ func main() {
|
||||
}
|
||||
defer db.DB.Close()
|
||||
|
||||
deadline.Cooldown = time.Second * time.Duration(*cooldown)
|
||||
|
||||
mux := hugot.DefaultMux
|
||||
mux.HandleHears("edb.AddQuoteHandler{QuoteDB: db})
|
||||
mux.HandleHears(deadline.NewHears("edb.LastQuoteHandler{QuoteDB: db}))
|
||||
|
Reference in New Issue
Block a user