This commit is contained in:
1-6
2023-07-15 07:15:49 +08:00
parent a15c68055f
commit 20cc7e343c
5 changed files with 139 additions and 29 deletions
+12 -3
View File
@@ -182,6 +182,13 @@ func initListenReply() {
}
func initToHandleMessage() {
listen_admin := sillyGirl.GetBool("listen_admin", true)
storage.Watch(sillyGirl, "listen_admin", func(old, new, key string) *storage.Final {
if new == "false" {
listen_admin = false
}
return nil
})
Messages = make(chan common.Sender)
go func() {
for {
@@ -261,9 +268,11 @@ func initToHandleMessage() {
}
_, ok1 := ListenOnGroups.Load(cid)
if !ok1 {
_, ok2 := StaticListenOnGroups.Load(cid)
if !ok2 {
ignore = true
if !listen_admin || !isAdmin {
_, ok2 := StaticListenOnGroups.Load(cid)
if !ok2 {
ignore = true
}
}
}
} else {