duplicated folder
This commit is contained in:
parent
82498ca72d
commit
b4a49918fc
|
|
@ -1,29 +0,0 @@
|
||||||
/*use crate::server::client::client_profile::Client;
|
|
||||||
|
|
||||||
use std::sync::Mutex;
|
|
||||||
use std::sync::Arc;
|
|
||||||
use std::collections::HashMap;
|
|
||||||
|
|
||||||
pub fn get_client_data(clients_ref: &Arc<Mutex<HashMap<String, Client>>>, data: &HashMap<String, String>) -> String{
|
|
||||||
let clients_hashmap = clients_ref.lock().unwrap();
|
|
||||||
let uuid = data.get("uuid").unwrap();
|
|
||||||
println!("uuid: {}", uuid);
|
|
||||||
|
|
||||||
for (key, value) in clients_hashmap.iter(){
|
|
||||||
println!("{}",key);
|
|
||||||
}
|
|
||||||
let client = clients_hashmap.get(uuid);
|
|
||||||
match client{
|
|
||||||
Some(data) => {
|
|
||||||
let mut message = String::from("!success:");
|
|
||||||
message.push_str(&" uuid:".to_string());
|
|
||||||
message.push_str(&data.get_uuid().to_string());
|
|
||||||
message.push_str(&" host:".to_string());
|
|
||||||
message.push_str(&data.get_address().to_string());
|
|
||||||
message.push_str(&" username:".to_string());
|
|
||||||
message.push_str(&data.get_username().to_string());
|
|
||||||
message
|
|
||||||
},
|
|
||||||
None => String::from("client not online"),
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
/*use crate::server::client::client_profile::Client;
|
|
||||||
|
|
||||||
pub fn format_client_data(uuid: &String, client: &Client) -> String{
|
|
||||||
["!client: username:",client.get_username(), " uuid:", uuid, " host:\"", client.get_address(), "\""].concat()
|
|
||||||
}*/
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
/*use crate::server::client::client_profile::Client;
|
|
||||||
|
|
||||||
use std::sync::Mutex;
|
|
||||||
use std::sync::Arc;
|
|
||||||
use std::collections::HashMap;
|
|
||||||
use dashmap::DashMap;
|
|
||||||
|
|
||||||
pub fn add_client(clients_ref: &Arc<Mutex<HashMap<String, Client>>>, client: &Client){
|
|
||||||
let mut clients_hashmap = clients_ref.lock().unwrap();
|
|
||||||
let uuid = client.get_uuid().to_string();
|
|
||||||
//clients_hashmap.insert(uuid, client.clone());
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
/*use crate::server::client::client_profile::Client;
|
|
||||||
|
|
||||||
use std::sync::Mutex;
|
|
||||||
use std::sync::Arc;
|
|
||||||
use std::collections::HashMap;
|
|
||||||
|
|
||||||
pub fn remove_client(clients_ref: &Arc<Mutex<HashMap<String, Client>>>, client: &Client){
|
|
||||||
let mut clients_hashmap = clients_ref.lock().unwrap();
|
|
||||||
clients_hashmap.remove(client.get_uuid()).unwrap();
|
|
||||||
}*/
|
|
||||||
Loading…
Reference in New Issue