Example #1
0
 private void ReloadAimlSets()
 {
     Platform.LogEvent("Loading aiml " + User.BotName, ConsoleColor.Gray);
     if (User.Id == 1)
     {
         BotEngine.loadAIMLFromFiles();
     }
     else
     {
         List <AimlSet> aimls = Platform.DBManager.AimlSets.Where(x => x.BotId == User.Id).ToList();
         foreach (AimlSet ai in aimls)
         {
             XmlDocument doc = new XmlDocument();
             doc.Load(Path.Combine(AIMLPath, ai.AimlFile));
             BotEngine.loadAIMLFromXML(doc, Path.Combine(AIMLPath, ai.AimlFile));
         }
     }
 }