Remove newly added users from backlog
This commit is contained in:
parent
b35e3eb06d
commit
21288a935d
12
src/main.rs
12
src/main.rs
|
@ -251,6 +251,9 @@ pub async fn main() {
|
|||
// Add new users
|
||||
users.append(&mut new_users);
|
||||
|
||||
// Track new user count
|
||||
let mut num_new_users = 0;
|
||||
|
||||
// For each user requesting an invite, see if one is available.
|
||||
// If not, they can try to join via open-entry invitation if the
|
||||
// censor is not active.
|
||||
|
@ -274,10 +277,19 @@ pub async fn main() {
|
|||
if !user_created && !censor.is_active() {
|
||||
if let Ok(user) = User::new(&sconfig, false, &mut bridges, &mut censor).await {
|
||||
users.push(user);
|
||||
user_created = true;
|
||||
}
|
||||
}
|
||||
|
||||
if user_created {
|
||||
// We successfully added a user, increment count
|
||||
num_new_users += 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove new users from backlog
|
||||
num_users_requesting_invites -= num_new_users;
|
||||
|
||||
// CENSOR TASKS
|
||||
|
||||
// On the day the censor activates, learn only the next 3 bridges (for efficiency)
|
||||
|
|
Loading…
Reference in New Issue