mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
Change the word filter configuration to allow providing reasons, fix emotes not working in filters, and implement separate OOC/IC/PDA filters (#61606)
This commit is contained in:
@@ -258,7 +258,7 @@ AI MODULES
|
||||
var/targName = stripped_input(user, "Please enter a new law for the AI.", "Freeform Law Entry", laws[1], CONFIG_GET(number/max_law_len))
|
||||
if(!targName)
|
||||
return
|
||||
if(CHAT_FILTER_CHECK(targName))
|
||||
if(is_ic_filtered(targName))
|
||||
to_chat(user, span_warning("Error: Law contains invalid text.")) // AI LAW 2 SAY U W U WITHOUT THE SPACES
|
||||
return
|
||||
laws[1] = targName
|
||||
@@ -465,7 +465,7 @@ AI MODULES
|
||||
var/targName = stripped_input(user, "Please enter a new core law for the AI.", "Freeform Law Entry", laws[1], CONFIG_GET(number/max_law_len))
|
||||
if(!targName)
|
||||
return
|
||||
if(CHAT_FILTER_CHECK(targName))
|
||||
if(is_ic_filtered(targName))
|
||||
to_chat(user, span_warning("Error: Law contains invalid text."))
|
||||
return
|
||||
laws[1] = targName
|
||||
@@ -487,7 +487,7 @@ AI MODULES
|
||||
var/targName = stripped_input(user, "Please enter a new law for the AI.", "Freeform Law Entry", laws[1], CONFIG_GET(number/max_law_len))
|
||||
if(!targName)
|
||||
return
|
||||
if(CHAT_FILTER_CHECK(targName)) // not even the syndicate can uwu
|
||||
if(is_ic_filtered(targName)) // not even the syndicate can uwu
|
||||
to_chat(user, span_warning("Error: Law contains invalid text."))
|
||||
return
|
||||
laws[1] = targName
|
||||
|
||||
@@ -758,6 +758,12 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
return
|
||||
if((last_text && world.time < last_text + 10) || (everyone && last_everyone && world.time < last_everyone + PDA_SPAM_DELAY))
|
||||
return
|
||||
|
||||
var/list/filter_result = is_ic_filtered_for_pdas(message)
|
||||
if (filter_result)
|
||||
REPORT_CHAT_FILTER_TO_USER(user, filter_result)
|
||||
return
|
||||
|
||||
if(prob(1))
|
||||
message += "\nSent from my PDA"
|
||||
// Send the signal
|
||||
|
||||
Reference in New Issue
Block a user