Fixed loading and added more plugin loading commands

This commit is contained in:
2025-12-22 01:34:05 +01:00
parent 113c0628ee
commit 299ec64667
3 changed files with 88 additions and 18 deletions
+1 -13
View File
@@ -90,19 +90,7 @@ impl Server {
plugin_loader.start_server();
// Load plugins
Self::LOGGER.info("Loading plugins");
for entry in fs::read_dir(self.root.join("plugins"))? {
let entry = entry?;
let path = entry.path();
if path.is_dir() {
let mut p = plugin_loader.load(&path);
let s = self.clone();
self.plugins.lock().unwrap().push(p.clone());
std::thread::spawn(move || p.run(&s));
}
}
Self::LOGGER.info("Plugins loaded");
plugin_loader.load_all(self);
// Initialize plugins
Self::LOGGER.info("Initializing plugins");