object blacklist, storing second length
This commit is contained in:
parent
86adf64575
commit
be729aa533
4 changed files with 25 additions and 10 deletions
|
@ -6,7 +6,8 @@ use std::sync::LazyLock;
|
|||
pub struct Config {
|
||||
pub general: ConfigGeneral,
|
||||
pub accounts: ConfigAccounts,
|
||||
pub db: ConfigDB
|
||||
pub db: ConfigDB,
|
||||
pub levels: ConfigLevels
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
@ -25,6 +26,11 @@ pub struct ConfigDB {
|
|||
pub data_folder: String
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct ConfigLevels {
|
||||
pub blocklist: Vec<i32>
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub fn load_from_file(file_path: &str) -> Self {
|
||||
let toml_str = fs::read_to_string(file_path).expect("Error finding toml config:");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue