Markov: don't add chains if the context is null

that should only be possible on non-pub/privmsgs, or if there
is a [subcommand] being analyzed. in any event, don't learn it.
This commit is contained in:
Brian S. Stephan 2011-06-16 21:25:22 -05:00
parent 74c03cff88
commit df3de56c4c

View File

@ -314,6 +314,9 @@ class Markov(Module):
context = target
# if there's no context, this is probably a sub-command. don't learn it
if context:
words = line.split()
if len(words) <= 0:
return line