Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion src/org/alicebot/ab/Bot.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,35 @@ public class Bot {
private SraixHandler sraixHandler = null;
public Locale locale = MagicBooleans.defaultLocale;

/**
* Set all directory path variables for this bot
*
* @param both_dir_path
* root directory of the bot's folder
*/
public void setAllPaths(String both_dir_path) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets rename this variable to something that makes sense.. like "bot_root" or something. "both_dir_path" doesn't really mean anything ..

if (MagicBooleans.trace_mode)
log.info("Name = " + name + " Path = " + both_dir_path);
aiml_path = both_dir_path + "/aiml";
aimlif_path = both_dir_path + "/aimlif";
config_path = both_dir_path + "/config";
log_path = both_dir_path + "/logs";
sets_path = both_dir_path + "/sets";
maps_path = both_dir_path + "/maps";
if (MagicBooleans.trace_mode) {
log.info(root_path);
log.info(bot_path);
log.info(both_dir_path);
log.info(aiml_path);
log.info(aimlif_path);
log.info(config_path);
log.info(log_path);
log.info(sets_path);
log.info(maps_path);
}
}


/**
* Set all directory path variables for this bot
*
Expand Down Expand Up @@ -137,7 +166,7 @@ public Bot(String name, String path, String action, Locale locale) {
int elementCnt = 0;
this.name = name;
this.locale = locale;
setAllPaths(path, name);
setAllPaths(path);
this.brain = new Graphmaster(this);

this.learnfGraph = new Graphmaster(this, "learnf");
Expand Down