mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-04 00:36:14 +00:00
Merge branch 'Lucky4Luuk:master' into welcome/leave-notification
This commit is contained in:
commit
7eaa382f6c
@ -377,14 +377,9 @@ impl Server {
|
|||||||
"Accepting {} incoming clients...",
|
"Accepting {} incoming clients...",
|
||||||
clients_incoming_lock.len()
|
clients_incoming_lock.len()
|
||||||
);
|
);
|
||||||
for i in 0..clients_incoming_lock.len() {
|
for client in clients_incoming_lock.drain(..) {
|
||||||
let (name, role, is_guest, beammp_id) = {
|
let userdata = client.get_userdata();
|
||||||
let client = clients_incoming_lock[i]
|
let (name, role, is_guest, beammp_id) = (userdata.username.clone(), userdata.roles.clone(), userdata.guest, userdata.uid.clone());
|
||||||
.info
|
|
||||||
.as_ref()
|
|
||||||
.unwrap();
|
|
||||||
(client.username.clone(), client.roles.clone(), client.guest, client.uid.clone())
|
|
||||||
};
|
|
||||||
info!("Welcome {name}!");
|
info!("Welcome {name}!");
|
||||||
joined_names.push(name.clone());
|
joined_names.push(name.clone());
|
||||||
let mut vrx = Vec::new();
|
let mut vrx = Vec::new();
|
||||||
@ -400,7 +395,7 @@ impl Server {
|
|||||||
// debug!("res: {:?}", res);
|
// debug!("res: {:?}", res);
|
||||||
vrx.push(rx);
|
vrx.push(rx);
|
||||||
}
|
}
|
||||||
self.clients_queue.push((clients_incoming_lock.swap_remove(i), vrx, Vec::new()));
|
self.clients_queue.push((client, vrx, Vec::new()));
|
||||||
}
|
}
|
||||||
trace!("Accepted incoming clients!");
|
trace!("Accepted incoming clients!");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user