Esempio n. 1
0
        public Chatbot(ABPS.Data.User user)
        {
            User      = user;
            BotEngine = new Bot(BotPath);
            // BotEngine.loadSettings(Path.Combine(BotPath, Path.Combine("config", "Settings.xml")));
            Visitors = new List <ABPS.Aiml.User>();

            if (!Directory.Exists(BotPath))
            {
                Copy(Path.Combine(Environment.CurrentDirectory, "bots", "default"), BotPath);
            }
        }
Esempio n. 2
0
 public void ReloadBot(ABPS.Data.User u)
 {
     User = u;
     Platform.LogEvent("Loading bot " + User.BotName, ConsoleColor.Magenta);
     BotEngine = new Bot(BotPath);
     BotEngine.isAcceptingUserInput = false;
     ReloadPersonality();
     ReloadAimlSets();
     BotEngine.isAcceptingUserInput = true;
     Visitors.Clear();
     foreach (Visitor v in User.Visitors)
     {
         AddVisitor(v);
     }
     Platform.LogEvent("Bot " + User.BotName + " loaded", ConsoleColor.DarkMagenta);
 }