Fix actio type upon function to set a filter;
Add missing preferences (Thank you mirux).
This commit is contained in:
parent
8df43fd327
commit
b03d082d96
2 changed files with 6 additions and 1 deletions
|
@ -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 = [
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue