🚸 IP 变更提醒增强

This commit is contained in:
naiba
2021-06-22 14:05:36 +08:00
parent d59acfa824
commit 365148e0ac
6 changed files with 53 additions and 22 deletions

View File

@@ -86,7 +86,8 @@ func (s *NezhaHandler) ReportSystemInfo(c context.Context, r *pb.Host) (*pb.Rece
dao.ServerLock.RLock()
defer dao.ServerLock.RUnlock()
if dao.Conf.EnableIPChangeNotification &&
dao.Conf.IgnoredIPNotificationServerIDs[clientID] != struct{}{} &&
((dao.Conf.Cover == model.ConfigCoverAll && !dao.Conf.IgnoredIPNotificationServerIDs[clientID]) ||
(dao.Conf.Cover == model.ConfigCoverIgnoreAll && dao.Conf.IgnoredIPNotificationServerIDs[clientID])) &&
dao.ServerList[clientID].Host != nil &&
dao.ServerList[clientID].Host.IP != "" &&
host.IP != "" &&