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:
parent
74c03cff88
commit
df3de56c4c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user