no config filter thing yet, but the code for it is "ready"
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
var/list/modes // allowed modes
|
||||
var/list/gamemode_cache
|
||||
var/list/votable_modes // votable modes
|
||||
// var/list/ic_filter_regex
|
||||
var/list/storyteller_cache
|
||||
var/list/mode_names
|
||||
var/list/mode_reports
|
||||
@@ -414,7 +415,7 @@
|
||||
continue
|
||||
runnable_modes[M] = probabilities[M.config_tag]
|
||||
return runnable_modes
|
||||
|
||||
/*
|
||||
/datum/controller/configuration/proc/LoadChatFilter()
|
||||
var/list/in_character_filter = list()
|
||||
|
||||
@@ -431,3 +432,4 @@
|
||||
ic_filter_regex = in_character_filter.len ? regex("\\b([jointext(in_character_filter, "|")])\\b", "i") : null
|
||||
|
||||
syncChatRegexes()
|
||||
*/
|
||||
|
||||
@@ -155,14 +155,14 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico
|
||||
/// Used to dynamically add regexes to the browser output. Currently only used by the IC filter.
|
||||
/datum/chatOutput/proc/syncRegex()
|
||||
var/list/regexes = list()
|
||||
|
||||
/*
|
||||
if (config.ic_filter_regex)
|
||||
regexes["show_filtered_ic_chat"] = list(
|
||||
config.ic_filter_regex.name,
|
||||
"ig",
|
||||
"<span class='boldwarning'>$1</span>"
|
||||
)
|
||||
|
||||
*/
|
||||
if (regexes.len)
|
||||
ehjax_send(data = list("syncRegex" = regexes))
|
||||
|
||||
|
||||
@@ -89,10 +89,11 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
var/static/list/one_character_prefix = list(MODE_HEADSET = TRUE, MODE_ROBOT = TRUE, MODE_WHISPER = TRUE)
|
||||
|
||||
var/ic_blocked = FALSE
|
||||
/*
|
||||
if(client && !forced && config.ic_filter_regex && findtext(message, config.ic_filter_regex))
|
||||
//The filter doesn't act on the sanitized message, but the raw message.
|
||||
ic_blocked = TRUE
|
||||
|
||||
*/
|
||||
if(sanitize)
|
||||
message = trim(copytext_char(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
if(!message || message == "")
|
||||
|
||||
Reference in New Issue
Block a user