Zway-Bot [v1.7.2] Add Logging to some Modules, fixing a bug in overtaker (now it not removes every time all events, so only the latest event are watched)

[Utils] Fixing a bug if more than one argument with params
This commit is contained in:
2018-10-02 14:53:59 +00:00
parent 7a1843c5e1
commit 7af4ef7c4e
4 changed files with 9 additions and 5 deletions
+1
View File
@@ -37,6 +37,7 @@ namespace BlubbFish.Utils.IoT.Bots.Moduls {
}
protected void Reconnect() {
Console.WriteLine("BlubbFish.Utils.IoT.Bots.Moduls.Mqtt.Reconnect()");
this.Disconnect();
this.Connect();
}
+5 -2
View File
@@ -13,12 +13,13 @@ namespace BlubbFish.Utils.IoT.Bots.Moduls {
#region Overtakerfunctions
protected void ParseIni() {
this.RemoveLibraryUpdateHooks();
foreach (KeyValuePair<String, Dictionary<String, String>> item in this.config) {
if (item.Value.ContainsKey("from")) {
String from = item.Value["from"];
String[] source = from.Split(':');
this.events.Add(source[0], item.Value);
this.LibraryUpdateHook(source[0]);
this.AddLibraryUpdateHook(source[0]);
}
}
}
@@ -53,7 +54,9 @@ namespace BlubbFish.Utils.IoT.Bots.Moduls {
}
}
protected abstract void LibraryUpdateHook(String id);
protected abstract void AddLibraryUpdateHook(String id);
protected abstract void RemoveLibraryUpdateHooks();
protected abstract void SetValueHook(String id, String prop, String value);
#endregion