don't have megahal learn internal commands

This commit is contained in:
Brian S. Stephan 2010-12-24 09:48:04 -06:00
parent 9ed1586783
commit 0ff44e1a47
1 changed files with 2 additions and 1 deletions

View File

@ -69,7 +69,8 @@ class MegaHAL(Module):
reply = self.megahal.get_reply(line)
elif re.search('^megahal$', line, re.IGNORECASE) is not None:
reply = self.megahal.get_reply_nolearn('')
else:
elif replypath is not None:
# only learn if the command is not an internal one
self.megahal.learn(line)
self.megahal.sync()