diff --git a/kaikout/assets/settings.toml b/kaikout/assets/settings.toml index a6b6cdf..d8aedc2 100644 --- a/kaikout/assets/settings.toml +++ b/kaikout/assets/settings.toml @@ -5,6 +5,7 @@ action = 0 # 1 to ban, or 0 to devioce. check_inactivity = 0 # Enable inactivity detection. check_message = 1 # Enable detection of message abuse. +check_moderation = 0 # Enable moderation abuse detection. check_status = 1 # Enable detection of status message abuse. count = 9 # The maximum allowed number of instances of a word or a phrase in a message. enabled = 1 # Work status (Value 0 to disable). @@ -15,6 +16,7 @@ inactivity_span = 30 # The maximum allowed time (in days) of inactivity. inactivity_warn = 300 # The time (in minutes) of inactivity to send a warning upon before action. Value can not be higher than of inactivity_span. rtbl_ignore = [] # A list of RTBL lists to exclude. score_messages = 3 # The maximum allowed number of message faults to act upon. +score_outcast = 10 # The maximum allowed number of ban and kick actions. score_presence = 10 # The maximum allowed number of presence faults to act upon. timer = 180 # Timer value (in seconds) for countdown before committing an action. allow = [ diff --git a/kaikout/xmpp/commands.py b/kaikout/xmpp/commands.py index 54541e2..72474df 100644 --- a/kaikout/xmpp/commands.py +++ b/kaikout/xmpp/commands.py @@ -451,12 +451,14 @@ class XmppCommands: new_keywords = keywords.split(',') processed_keywords = [] if axis: + action = 'added' for keyword in new_keywords: if keyword and keyword not in keyword_list: keyword_trim = keyword.strip() keyword_list.append(keyword_trim) processed_keywords.append(keyword_trim) else: + action = 'removed' for keyword in new_keywords: if keyword and keyword in keyword_list: keyword_trim = keyword.strip() @@ -464,7 +466,8 @@ class XmppCommands: processed_keywords.append(keyword_trim) Toml.update_jid_settings(self, room, db_file, filter, keyword_list) processed_keywords.sort() - message = 'Keywords "{}" have been added to list "{}".'.format(', '.join(processed_keywords), filter) + message = 'Keywords "{}" have been {} to list "{}".'.format( + ', '.join(processed_keywords), action, filter) return message