diff options
| author | 2018-08-30 11:14:19 +0100 | |
|---|---|---|
| committer | 2018-08-30 11:14:19 +0100 | |
| commit | 2d4a1d42cea6b08314410ffe2e02099a05d35374 (patch) | |
| tree | 05ef6b8fd88ebcf672d8f722cb38a158f1b7be2c /modules | |
| parent | Add help and usage for commands in channel_op.py (diff) | |
| signature | ||
Only get highlight-spam-threshold setting when there's more than one highlight
in a line
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/channel_op.py | 6 |
1 files changed, 3 insertions, 3 deletions
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) |
