Fixed bugz0r in handling of nested actioning replies in tell.

This commit is contained in:
Jeremy Fincher 2004-02-01 23:04:19 +00:00
parent 096bbdc463
commit ad4b7945ae
2 changed files with 9 additions and 2 deletions

View File

@ -438,6 +438,9 @@ class Misc(callbacks.Privmsg):
if c.lobotomized:
irc.error('I\'m lobotomized in %s.' % target)
return
if irc.action:
irc.action = False
text = '* %s %s' % (irc.nick, text)
s = '%s wants me to tell you: %s' % (msg.nick, text)
irc.reply(s, to=target, private=True)
@ -457,9 +460,9 @@ class Misc(callbacks.Privmsg):
"""
text = privmsgs.getArgs(args)
if text:
irc.queueMsg(ircmsgs.action(ircutils.replyTo(msg), ' '.join(args)))
irc.reply(text, action=True)
else:
raise callbacks.Error
raise callbacks.ArgumentError
def notice(self, irc, msg, args):
"""<text>

View File

@ -138,6 +138,10 @@ class MiscTestCase(ChannelPluginTestCase, PluginDocumentation):
m = self.getMsg('tell me you love me')
self.failUnless(m.args[0] == self.nick)
def testTellDoesNotPropogateAction(self):
m = self.getMsg('tell foo [action bar]')
self.failIf(ircmsgs.isAction(m))
def testLast(self):
self.feedMsg('foo bar baz')
self.assertResponse('last', '<%s> foo bar baz' % self.nick)