|
@@ -98,7 +98,7 @@ class ChatChannel(Channel):
|
|
|
# 校验关键字
|
|
# 校验关键字
|
|
|
match_prefix = check_prefix(content, conf().get("group_chat_prefix"))
|
|
match_prefix = check_prefix(content, conf().get("group_chat_prefix"))
|
|
|
match_contain = check_contain(content, conf().get("group_chat_keyword"))
|
|
match_contain = check_contain(content, conf().get("group_chat_keyword"))
|
|
|
- group_name_black_list = config.get("group_name_black_list", [])
|
|
|
|
|
|
|
+ nick_name_black_list = conf().get("nick_name_black_list", [])
|
|
|
flag = False
|
|
flag = False
|
|
|
if context["msg"].to_user_id != context["msg"].actual_user_id:
|
|
if context["msg"].to_user_id != context["msg"].actual_user_id:
|
|
|
if match_prefix is not None or match_contain is not None:
|
|
if match_prefix is not None or match_contain is not None:
|
|
@@ -107,8 +107,9 @@ class ChatChannel(Channel):
|
|
|
content = content.replace(match_prefix, "", 1).strip()
|
|
content = content.replace(match_prefix, "", 1).strip()
|
|
|
if context["msg"].is_at:
|
|
if context["msg"].is_at:
|
|
|
logger.info("[WX]receive group at")
|
|
logger.info("[WX]receive group at")
|
|
|
- if context["msg"].actual_user_nickname in group_name_black_list:
|
|
|
|
|
- logger.info("[WX]Is In BlackList")
|
|
|
|
|
|
|
+ nick_name = context["msg"].actual_user_nickname
|
|
|
|
|
+ if nick_name and nick_name in nick_name_black_list:
|
|
|
|
|
+ logger.info(f"[WX] Nickname {nick_name} in In BlackList, ignore")
|
|
|
return None
|
|
return None
|
|
|
if not conf().get("group_at_off", False):
|
|
if not conf().get("group_at_off", False):
|
|
|
flag = True
|
|
flag = True
|