From 13ba99025dd18688b4c39b60390858d4f5889391 Mon Sep 17 00:00:00 2001 From: Andreas Neue Date: Tue, 12 Jul 2016 14:00:03 +0200 Subject: [PATCH] Added -autocmd --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index d371ed1..6d839a2 100644 --- a/main.go +++ b/main.go @@ -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")