From ad4b7945aecc4614b222259c5d5dd85d0c7e6ad9 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sun, 1 Feb 2004 23:04:19 +0000 Subject: [PATCH] Fixed bugz0r in handling of nested actioning replies in tell. --- src/Misc.py | 7 +++++-- test/test_Misc.py | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Misc.py b/src/Misc.py index 7a5020f39..e408f3911 100755 --- a/src/Misc.py +++ b/src/Misc.py @@ -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): """ diff --git a/test/test_Misc.py b/test/test_Misc.py index e668a370b..3b99e9a6d 100644 --- a/test/test_Misc.py +++ b/test/test_Misc.py @@ -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)