From 85355f5da7648f21c5c49bbf2eec502d67451ff1 Mon Sep 17 00:00:00 2001 From: James Vega Date: Wed, 25 Aug 2004 19:35:03 +0000 Subject: [PATCH] We have to unAction or we get ugly replies --- plugins/Markov.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/Markov.py b/plugins/Markov.py index adee4265e..7e29c8c24 100644 --- a/plugins/Markov.py +++ b/plugins/Markov.py @@ -199,14 +199,16 @@ class Markov(callbacks.Privmsg): def die(self): self.q.die() - def tokenize(self, s): - # XXX: Should this be smarter? - return s.split() + def tokenize(self, m): + if ircmsgs.isAction(m): + return ircmsgs.unAction(m).split() + else: + return m.args[1].split() def doPrivmsg(self, irc, msg): channel = msg.args[0] if ircutils.isChannel(channel): - words = self.tokenize(msg.args[1]) + words = self.tokenize(msg) words.insert(0, '\n') words.insert(0, '\n') words.append('\n')