diff --git a/develop/qinglong/cron.go b/develop/qinglong/cron.go index d54ef51..d7d41fa 100644 --- a/develop/qinglong/cron.go +++ b/develop/qinglong/cron.go @@ -199,6 +199,9 @@ func init() { Admin: true, Cron: "*/5 * * * *", Handle: func(s core.Sender) interface{} { + if Config.Host == "" { + return nil + } if s.GetImType() == "fake" && qinglong.GetBool("autoCronHideDuplicate", true) == false { return nil } diff --git a/develop/qinglong/init.go b/develop/qinglong/init.go index 7680e98..b455bc1 100644 --- a/develop/qinglong/init.go +++ b/develop/qinglong/init.go @@ -79,6 +79,9 @@ func (ql *QingLong) GetToken() (string, error) { } func (ql *QingLong) Req(ps ...interface{}) error { + if ql.Host == "" { + return nil + } token, err := ql.GetToken() if err != nil { return err