We have to unAction or we get ugly replies

This commit is contained in:
James Vega 2004-08-25 19:35:03 +00:00
parent ba7b018078
commit 85355f5da7

View File

@ -199,14 +199,16 @@ class Markov(callbacks.Privmsg):
def die(self): def die(self):
self.q.die() self.q.die()
def tokenize(self, s): def tokenize(self, m):
# XXX: Should this be smarter? if ircmsgs.isAction(m):
return s.split() return ircmsgs.unAction(m).split()
else:
return m.args[1].split()
def doPrivmsg(self, irc, msg): def doPrivmsg(self, irc, msg):
channel = msg.args[0] channel = msg.args[0]
if ircutils.isChannel(channel): if ircutils.isChannel(channel):
words = self.tokenize(msg.args[1]) words = self.tokenize(msg)
words.insert(0, '\n') words.insert(0, '\n')
words.insert(0, '\n') words.insert(0, '\n')
words.append('\n') words.append('\n')