diff --git a/Bot-Utils/Bot-Utils.csproj b/Bot-Utils/Bot-Utils.csproj
index f434382..eb2da40 100644
--- a/Bot-Utils/Bot-Utils.csproj
+++ b/Bot-Utils/Bot-Utils.csproj
@@ -5,32 +5,33 @@
BlubbFish.Utils.IoT.Bots
Bot-Utils
Bots.IoT.Utils.BlubbFish
- 1.2.3
- 1.2.3
- 1.2.3
+ 1.2.4
de-DE
Bot-Utils are helpers for programming a bot
BlubbFish
BlubbFish
- Copyright © BlubbFish 2018 - 09.01.2022
+ Copyright © BlubbFish 2018 - 18.01.2022
LICENSE
http://git.blubbfish.net/vs_utils/Bot-Utils
http://git.blubbfish.net/vs_utils/Bot-Utils.git
git
- 1.2.3 Tiny Refactoring
-1.2.2 Going to netcore
-1.2.1 When using Dispose, kill also mqtt connection and other tiny fixes
-1.2.0 Refactor Bot to ABot and refere MultiSourceBot, Webserver and Bot to it. Add MultiSourceBot. Rewrite Mqtt module so that it not need to watch the connection.
-1.1.9 Modify Output of SendFileResponse
-1.1.8 Add logger to Webserver Class
-1.1.7 Restrucutre loading, so that all is init and after the listener is started, REQUEST_URL_HOST gives now host and port
-1.1.6 rename functions and make SendFileResponse with a parameter for the folder (default resources), also put returntype boolean, add function that parse post params, if path is a dictionary try to load index.html
-1.1.5 add a function to send an object as json directly
-1.1.4 add Woff as Binary type
-1.1.3 Variables parsing now as a String
-1.1.2 Fixing bug for Contenttype
-1.1.1 Update to local librarys
-1.1.0 Remove Helper from Bot-Utils
+
+ 1.2.4 - 2022-01-18 - Config enabled module loading
+ 1.2.3 - 2022-01-09 - Tiny Refactoring
+ 1.2.2 - 2021-08-22 - Going to netcore
+ 1.2.1 - 2019-08-30 - When using Dispose, kill also mqtt connection and other tiny fixes
+ 1.2.0 - 2019-05-27 - Refactor Bot to ABot and refere MultiSourceBot
+ 1.1.9 - 2019-04-21 - Modify Output of SendFileResponse
+ 1.1.8 - 2019-04-15 - Add logger to Webserver Class
+ 1.1.7 - 2019-04-14 - REQUEST_URL_HOST
+ 1.1.6 - 2019-04-03 - Refactoring and bugfixing
+ 1.1.5 - 2019-03-27 - add a function to send an object as json directly
+ 1.1.4 - 2019-03-13 - add Woff as Binary type
+ 1.1.3 - 2019-03-10 - Variables parsing now as a String
+ 1.1.2 - 2019-03-08 - Fixing bug for Contenttype
+ 1.1.1 - 2019-02-17 - Update to local librarys
+ 1.1.0 - 2019-02-14 - Remove Helper from Bot-Utils
+
diff --git a/Bot-Utils/Bot.cs b/Bot-Utils/Bot.cs
index 3d958e1..073265b 100644
--- a/Bot-Utils/Bot.cs
+++ b/Bot-Utils/Bot.cs
@@ -25,13 +25,18 @@ namespace BlubbFish.Utils.IoT.Bots {
String name = t.Name;
try {
if (InIReader.ConfigExist(name.ToLower())) {
- Console.WriteLine("BlubbFish.Utils.IoT.Bots.Bot.ModulLoader: Load Modul " + name);
- this.moduls.Add(name, (AModul)t.GetConstructor(new Type[] { typeof(T), typeof(InIReader) }).Invoke(new Object[] { library, InIReader.GetInstance(name.ToLower()) }));
- Console.WriteLine("BlubbFish.Utils.IoT.Bots.Bot.ModulLoader: Loaded Modul " + name);
- } else if (t.HasInterface(typeof(IForceLoad))) {
- Console.WriteLine("BlubbFish.Utils.IoT.Bots.Bot.ModulLoader: Load Modul Forced " + name);
+ Dictionary modulconfig = InIReader.GetInstance(name.ToLower()).GetSection("modul");
+ if(!(modulconfig.ContainsKey("enabled") && modulconfig["enabled"].ToLower() == "false")) {
+ Console.WriteLine("BlubbFish.Utils.IoT.Bots.Bot.ModulLoader: Load Modul " + name);
+ this.moduls.Add(name, (AModul)t.GetConstructor(new Type[] { typeof(T), typeof(InIReader) }).Invoke(new Object[] { library, InIReader.GetInstance(name.ToLower()) }));
+ Console.WriteLine("BlubbFish.Utils.IoT.Bots.Bot.ModulLoader: Loaded Modul " + name);
+ continue;
+ }
+ }
+ if (t.HasInterface(typeof(IForceLoad))) {
+ Console.WriteLine("BlubbFish.Utils.IoT.Bots.Bot.ModulLoader: Forced Load Modul " + name);
this.moduls.Add(name, (AModul)t.GetConstructor(new Type[] { typeof(T), typeof(InIReader) }).Invoke(new Object[] { library, null }));
- Console.WriteLine("BlubbFish.Utils.IoT.Bots.Bot.ModulLoader: Loaded Modul Forced " + name);
+ Console.WriteLine("BlubbFish.Utils.IoT.Bots.Bot.ModulLoader: Forced Loaded Modul " + name);
}
} catch(Exception e) {
Helper.WriteError(e.InnerException.Message);
diff --git a/Changelog.md b/Changelog.md
index 66f2a0b..c972304 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,5 +1,11 @@
# Changelog
+## 1.2.4 - 2022-01-18 - Config enabled module loading
+### New Features
+* Modules can have an enabled=true|false in config, so that also enables or disables moduleloading.
+### Bugfixes
+### Changes
+
## 1.2.3 - 2022-01-09 - Tiny Refactoring
### New Features
### Bugfixes