From c756821dbc9fd7c33c951dafb1650ffdfb80f84e Mon Sep 17 00:00:00 2001 From: thsrite Date: Mon, 8 Apr 2024 11:42:23 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E8=B7=B3=E8=BF=87=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/wechatforward/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/wechatforward/__init__.py b/plugins/wechatforward/__init__.py index 946f91c..34bf940 100644 --- a/plugins/wechatforward/__init__.py +++ b/plugins/wechatforward/__init__.py @@ -284,6 +284,11 @@ class WeChatForward(_PluginBase): # 特定消息指定用户 if self._specify_confs: for specify_conf in self._specify_confs.split("\n"): + if not specify_conf: + continue + # 跳过注释 + if str(specify_conf).startswith("#"): + continue specify = specify_conf.split(" > ") if len(specify) != 3: continue @@ -311,6 +316,11 @@ class WeChatForward(_PluginBase): is_save_history = False extra_confs = self._extra_confs.split("\n") for extra_conf in extra_confs: + if not extra_conf: + continue + # 跳过注释 + if str(extra_conf).startswith("#"): + continue extras = str(extra_conf).split(" > ") if len(extras) != 4: continue