2022-08-12 20:32:22 +00:00
|
|
|
use std::{collections::HashMap, sync::Mutex};
|
2022-06-17 11:43:23 +00:00
|
|
|
|
2022-08-12 20:32:22 +00:00
|
|
|
use lazy_static::lazy_static;
|
|
|
|
|
2022-08-12 21:12:29 +00:00
|
|
|
use crate::server::Client;
|
2022-06-17 20:32:07 +00:00
|
|
|
|
2022-06-05 14:08:13 +00:00
|
|
|
pub mod commands;
|
|
|
|
pub mod plugins;
|
2022-08-12 21:12:29 +00:00
|
|
|
pub mod server;
|
2022-07-29 19:55:21 +00:00
|
|
|
|
2022-08-12 20:32:22 +00:00
|
|
|
lazy_static! {
|
2022-08-12 21:12:29 +00:00
|
|
|
/// List with all connected clients
|
2022-08-12 20:32:22 +00:00
|
|
|
pub static ref CLIENTS: Mutex<HashMap<usize, Client>> = Mutex::new(HashMap::new());
|
2022-08-12 21:12:29 +00:00
|
|
|
/// Next ID of the client to be add to [CLIENTS]
|
2022-08-12 20:32:22 +00:00
|
|
|
pub static ref CLIENT_NEXT: Mutex<usize> = Mutex::new(0);
|
|
|
|
}
|