diff --git a/modules/Markov.py b/modules/Markov.py index 1a2c7f2..f057b43 100644 --- a/modules/Markov.py +++ b/modules/Markov.py @@ -205,6 +205,10 @@ class Markov(Module): """Learn one line, as provided to the command.""" target = event.target() + + if not irclib.is_channel(target): + target = nick + match = self.learnre.search(what) if match: line = match.group(1) @@ -217,6 +221,10 @@ class Markov(Module): """Generate a reply to one line, without learning it.""" target = event.target() + + if not irclib.is_channel(target): + target = nick + match = self.replyre.search(what) if match: min_size = 15