From 2d4a1d42cea6b08314410ffe2e02099a05d35374 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 30 Aug 2018 11:14:19 +0100 Subject: Only get highlight-spam-threshold setting when there's more than one highlight in a line --- modules/channel_op.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/channel_op.py b/modules/channel_op.py index 608e95c8..b0f1c5ab 100644 --- a/modules/channel_op.py +++ b/modules/channel_op.py @@ -126,9 +126,9 @@ class Module(object): nicknames = list(map(lambda user: user.nickname, event["channel"].users)) + [event["server"].nickname] - if len(set(nicknames) & set(event["message_split"]) - ) >= event["channel"].get_setting( - "highlight-spam-threshold", 10): + highlights = set(nicknames) & set(event["message_split"]) + if len(highlights) > 1 and len(highlights) >= event["channel" + ].get_setting("highlight-spam-threshold", 10): has_mode = event["channel"].mode_or_above(event["user"], "v") should_ban = event["channel"].get_setting("highlight-spam-ban", False) -- cgit v1.3.1-10-gc9f91