mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 11:36:24 +01:00
Adds the ability to soft filter words, also fixes some word filter bugs (#62158)
This commit is contained in:
@@ -36,6 +36,13 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
|
||||
REPORT_CHAT_FILTER_TO_USER(usr, filter_result)
|
||||
return
|
||||
|
||||
var/list/soft_filter_result = is_soft_ooc_filtered(msg)
|
||||
if (soft_filter_result)
|
||||
if(tgui_alert(usr,"Your message contains \"[soft_filter_result[CHAT_FILTER_INDEX_WORD]]\". \"[soft_filter_result[CHAT_FILTER_INDEX_REASON]]\", Are you sure you want to say it?", "Soft Blocked Word", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] has passed the soft filter for \"[soft_filter_result[CHAT_FILTER_INDEX_WORD]]\" they may be using a disallowed term. Message: \"[msg]\"")
|
||||
log_admin_private("[key_name(usr)] has passed the soft filter for \"[soft_filter_result[CHAT_FILTER_INDEX_WORD]]\" they may be using a disallowed term. Message: \"[msg]\"")
|
||||
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user