mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
reincorporate db brain as well
This commit is contained in:
parent
5de87681e8
commit
0d8b89cce6
@ -76,11 +76,11 @@ class SpiceBot_AI():
|
||||
|
||||
def load_bot_values(self):
|
||||
|
||||
# current_bot_db = botdb.get_bot_value('botai') or None
|
||||
# if current_bot_db:
|
||||
# for predicate in list(current_bot_db.keys()):
|
||||
# predval = current_bot_db[predicate]
|
||||
# self.aiml_kernel.setBotPredicate(predicate, predval)
|
||||
current_bot_db = botdb.get_plugin_value('SpiceBot_AI', 'brain') or None
|
||||
if current_bot_db:
|
||||
for predicate in list(current_bot_db.keys()):
|
||||
predval = current_bot_db[predicate]
|
||||
self.aiml_kernel.setBotPredicate(predicate, predval)
|
||||
|
||||
# sopel nick
|
||||
self.aiml_kernel.setBotPredicate("nick", botconfig.nick)
|
||||
@ -242,8 +242,8 @@ class SpiceBot_AI():
|
||||
|
||||
def save_brain(self):
|
||||
self.aiml_kernel.saveBrain(botconfig.config.aibrain)
|
||||
# botsessiondata = self.aiml_kernel._botPredicates
|
||||
# botdb.set_bot_value('botai', botsessiondata)
|
||||
botsessiondata = self.aiml_kernel._botPredicates
|
||||
botdb.set_plugin_value('SpiceBot_AI', 'brain', botsessiondata)
|
||||
|
||||
|
||||
botai = SpiceBot_AI()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user