This commit is contained in:
cdle
2021-10-08 11:59:44 +08:00
parent cbb16963e4
commit 267be6e1fa
-10
View File
@@ -3,7 +3,6 @@ package core
import (
"regexp"
"strings"
"sync"
"github.com/beego/beego/v2/adapter/httplib"
)
@@ -36,18 +35,9 @@ func (ct *Chat) Push(content interface{}) {
}
}
var notLock sync.Locker
var msgs = map[string]string{}
func NotifyMasters(content string) {
go func() {
content = strings.Trim(content, " ")
notLock.Lock()
defer notLock.Unlock()
if _, ok := msgs[content]; ok {
return
}
msgs[content] = ""
if sillyGirl.GetBool("ignore_notify", false) == true {
return
}