Skip to content

Commit

Permalink
apply bots fix
Browse files Browse the repository at this point in the history
  • Loading branch information
supertick committed Apr 29, 2024
1 parent 325f659 commit 988a471
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/org/myrobotlab/service/ProgramAB.java
Original file line number Diff line number Diff line change
Expand Up @@ -813,8 +813,6 @@ public String addBotPath(String path) {

bots.put(botInfo.name, botInfo);
botInfo.img = getBotImage(botInfo.name);

broadcastState();
} else {
error("invalid bot path %s - a bot must be a directory with a subdirectory named \"aiml\"", path);
return null;
Expand Down Expand Up @@ -1115,10 +1113,11 @@ public ProgramABConfig getConfig() {
public ProgramABConfig apply(ProgramABConfig c) {
super.apply(c);
if (c.bots != null && c.bots.size() > 0) {
// bots.clear();
bots.clear();
for (String botPath : c.bots) {
addBotPath(botPath);
}
broadcastState();
}

if (c.currentUserName != null) {
Expand Down

0 comments on commit 988a471

Please sign in to comment.