Skip to content

Commit

Permalink
Ignore empty AdminsList
Browse files Browse the repository at this point in the history
  • Loading branch information
RipleyTom committed Sep 20, 2024
1 parent f45612b commit edaf288
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ impl Config {

let set_admins_list = |d_list: &mut Vec<String>| {
if let Some(data) = config_data.get("AdminsList") {
if data.is_empty() {
return;
}

let admins_list: Vec<String> = data.split(',').map(|a| a.trim().to_string()).collect();

if admins_list.iter().map(|username| Client::is_valid_username(username)).any(|r| !r) {
Expand Down

0 comments on commit edaf288

Please sign in to comment.