Testing indicators

This commit is contained in:
2025-12-23 12:24:37 +01:00
parent aa8996d79a
commit fcdf8e2e38
6 changed files with 99 additions and 56 deletions
+6 -1
View File
@@ -44,6 +44,7 @@ pub struct Server {
pub plugins: Mutex<Vec<Plugin>>,
pub db: utils::database::Database,
pub shutting_down: AtomicBool,
pub indicators: Mutex<Vec<crate::requests::indicator::IndicatorContext>>,
}
impl Default for ServerConfig {
@@ -79,6 +80,7 @@ impl Server {
clients: Mutex::new(HashSet::new()),
plugins: Mutex::new(Vec::new()),
shutting_down: AtomicBool::new(false),
indicators: Mutex::new(Vec::new()),
})
}
@@ -164,7 +166,10 @@ impl Server {
let uuid = self.wrap_err(&client, auth_res)?;
self.wrap_err(
&client,
client.send(types::message::ServerMessage::Authenticated { uuid }),
client.send(types::message::ServerMessage::Authenticated {
uuid,
indicators: self.indicators.lock().unwrap().clone(),
}),
)?;
}
Some(v) => {