mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
Adds the ability to soft filter words, also fixes some word filter bugs (#62158)
This commit is contained in:
@@ -9,8 +9,21 @@
|
||||
mods[RADIO_EXTENSION] = GLOB.department_radio_keys[mods[RADIO_KEY]]
|
||||
return message
|
||||
|
||||
/mob/dead/observer/say(message, bubble_type, list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null)
|
||||
/mob/dead/observer/say(message, bubble_type, list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null, filterproof = null)
|
||||
message = trim(message) //trim now and sanitize after checking for special admin radio keys
|
||||
|
||||
var/list/filter_result = is_ooc_filtered(message)
|
||||
if (filter_result)
|
||||
REPORT_CHAT_FILTER_TO_USER(usr, filter_result)
|
||||
return
|
||||
|
||||
var/list/soft_filter_result = is_soft_ooc_filtered(message)
|
||||
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: \"[message]\"")
|
||||
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: \"[message]\"")
|
||||
|
||||
if(!message)
|
||||
return
|
||||
var/list/message_mods = list()
|
||||
|
||||
Reference in New Issue
Block a user