Whatever this is
This commit is contained in:
parent
456830fc3a
commit
3c84378910
2 changed files with 5 additions and 7 deletions
|
@ -66,12 +66,8 @@ fn parse_server_dir(mut config: Value, server_config_path: PathBuf)
|
||||||
config = merge_config_maps(config, client_config)?;
|
config = merge_config_maps(config, client_config)?;
|
||||||
},
|
},
|
||||||
"channels.toml" => {
|
"channels.toml" => {
|
||||||
let channels = Value::from(parse_toml_to_table(entry.path())?);
|
let channel_config = parse_toml_to_table(entry.path())?;
|
||||||
if config.contains_key(&"channels".to_owned()) {
|
config = merge_config_maps(config, channel_config)?;
|
||||||
config[&"channels".to_owned()] = channels;
|
|
||||||
} else {
|
|
||||||
config.insert("channels".to_owned(), channels);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,8 +79,10 @@ fn main() {
|
||||||
|
|
||||||
for s_conf in server_configs {
|
for s_conf in server_configs {
|
||||||
let t = tx.clone();
|
let t = tx.clone();
|
||||||
|
let addr = s_conf.get("server").unwrap().as_str()
|
||||||
|
.ok_or("Could not get server adress from config").unwrap();
|
||||||
server_threads.push(thread::Builder::new()
|
server_threads.push(thread::Builder::new()
|
||||||
.name("server name here".to_string())
|
.name(addr.to_string())
|
||||||
.spawn(move || {
|
.spawn(move || {
|
||||||
servers::handle_server(s_conf, t, 5).unwrap();
|
servers::handle_server(s_conf, t, 5).unwrap();
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue