diff --git a/plugins/admin/admin.go b/plugins/admin/admin.go index d8fd18b..7e41916 100644 --- a/plugins/admin/admin.go +++ b/plugins/admin/admin.go @@ -7,6 +7,7 @@ import ( "fmt" "html/template" "net/http" + "os" "strings" "time" @@ -66,6 +67,11 @@ func (p *AdminPlugin) message(conn bot.Connector, k bot.Kind, message msg.Messag return false } + if strings.ToLower(body) == "reboot" { + log.Info().Msgf("Got reboot command") + os.Exit(0) + } + if strings.ToLower(body) == "shut up" { dur := time.Duration(p.cfg.GetInt("quietDuration", 5)) * time.Minute log.Info().Msgf("Going to sleep for %v, %v", dur, time.Now().Add(dur))