Added -autocmd

This commit is contained in:
Andreas Neue 2016-07-12 14:00:03 +02:00
parent 600954764a
commit 13ba99025d
1 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,7 @@ var (
nspass = flag.String("nspass", "", "NickServ password")
mods = flag.String("mods", "", "Modules to load")
params = flag.String("params", "", "Module params")
autocmd = flag.String("autocmd", "", "Autosend IRC command")
)
func init() {
@ -84,6 +85,10 @@ func main() {
}()
go Ping(bot)
if *autocmd != "" {
println(*autocmd)
bot.Sender.Send(&irc.Message{Command: *autocmd})
}
RegisterHandlers(bot)
bot.HandleLoop()
xlog.Info("Exiting")