diff --git a/sopel_modules/SpiceBot/AI.py b/sopel_modules/SpiceBot/AI.py index 23a1c3c..a4d4fda 100644 --- a/sopel_modules/SpiceBot/AI.py +++ b/sopel_modules/SpiceBot/AI.py @@ -23,13 +23,13 @@ class SpiceBot_AI(): for plugin_dir in set(sopel_modules.__path__): configsdir = os.path.join(plugin_dir, "SpiceBot_Configs") aimldir = os.path.join(configsdir, "aiml") - for aimlfile in os.listdir(aimldir): - aiml_filename = os.path.join(aimldir, aimlfile) - try: - self.aiml_kernel.learn(aiml_filename) - self.dict['counts'] += 1 - except Exception as e: - logs.log('SpiceBot_AI', "Error loading %s: %s (%s)" % ('aiml', e, aiml_filename)) + aimlstarter = os.path.join(aimldir, "std-startup.xml") + try: + self.aiml_kernel.learn(aimlstarter) + self.aiml_kernel.respond("LOAD AIML B") + self.dict['counts'] += 1 + except Exception as e: + logs.log('SpiceBot_AI', "Error loading %s: %s (%s)" % ('aiml', e, aimlstarter)) logs.log('SpiceBot_AI', "Found " + str(self.dict['counts']) + " " + 'aiml' + " commands.", True) def on_message(self, message): diff --git a/sopel_modules/SpiceBot_Configs/aiml/ai.aiml b/sopel_modules/SpiceBot_Configs/aiml/aiml/ai.aiml similarity index 100% rename from sopel_modules/SpiceBot_Configs/aiml/ai.aiml rename to sopel_modules/SpiceBot_Configs/aiml/aiml/ai.aiml diff --git a/sopel_modules/SpiceBot_Configs/aiml/std-startup.xml b/sopel_modules/SpiceBot_Configs/aiml/std-startup.xml new file mode 100644 index 0000000..8d7c1e5 --- /dev/null +++ b/sopel_modules/SpiceBot_Configs/aiml/std-startup.xml @@ -0,0 +1,22 @@ + + + + + + + + + LOAD AIML B + + + + + + + +