mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
[MIRROR] Take Two: The word filter now verbosely describes config failure (Rust-g 1.0.2 Edition) [MDB IGNORE] (#15328)
* Take Two: The word filter now verbosely describes config failure (Rust-g 1.0.2 Edition) (#68690) A resuscitation of #67474 since Arm is not presently able to do it. rustg_read_toml_file has backwards dependency to support older cases that checked for lack of list (the old sign the rust fn went wrong). Fixes #67446 The configuration for the word filter now verbosely describes the error from the bad toml to the logs, allowing problems with it to be identified quicker and resolved. Why It's Good For The Game BLAZING Ferris warning Changelog cl Armhulen/Armhulenn/Bazelart/Tralezab, san7890 admin: Word filters incorrectly set up will now have their errors actually described. Please, tell your server ops when you see it so they may fix the configuration. server: Rust-g on this codebase is now on the 1.0.2 version, prepare accordingly. /cl I also bump rust-g's DLL to 1.0.2 in this PR as well. * Take Two: The word filter now verbosely describes config failure (Rust-g 1.0.2 Edition) Co-authored-by: san7890 <the@san7890.com>
This commit is contained in:
@@ -378,13 +378,13 @@ Example config:
|
||||
return
|
||||
|
||||
log_config("Loading config file word_filter.toml...")
|
||||
|
||||
var/list/word_filter = rustg_read_toml_file("[directory]/word_filter.toml")
|
||||
if (!islist(word_filter))
|
||||
var/message = "The word filter configuration did not output a list, contact someone with configuration access to make sure it's setup properly."
|
||||
var/list/result = rustg_read_toml_file("[directory]/word_filter.toml")
|
||||
if(!result["success"])
|
||||
var/message = "The word filter is not configured correctly! [result["content"]]"
|
||||
log_config(message)
|
||||
DelayedMessageAdmins(message)
|
||||
return
|
||||
var/list/word_filter = result["content"]
|
||||
|
||||
ic_filter_reasons = try_extract_from_word_filter(word_filter, "ic")
|
||||
ic_outside_pda_filter_reasons = try_extract_from_word_filter(word_filter, "ic_outside_pda")
|
||||
|
||||
Reference in New Issue
Block a user