diff --git a/src/Misc.py b/src/Misc.py index 3da0fcea8..54fc39382 100755 --- a/src/Misc.py +++ b/src/Misc.py @@ -429,6 +429,8 @@ class Misc(callbacks.Privmsg): your benefit here. """ (target, text) = privmsgs.getArgs(args, required=2) + if target.lower() == 'me': + target = msg.nick if not ircutils.isNick(target) and not ircutils.isChannel(target): irc.error('%s is not a valid nick or channel.' % target) return diff --git a/test/test_Misc.py b/test/test_Misc.py index 150343926..fb9fa7a8b 100644 --- a/test/test_Misc.py +++ b/test/test_Misc.py @@ -135,6 +135,8 @@ class MiscTestCase(ChannelPluginTestCase, PluginDocumentation): m = self.getMsg('tell #foo [plugin tell]') self.failUnless(m.args[0] == '#foo') self.failUnless('Misc' in m.args[1]) + m = self.getMsg('tell me you love me') + self.failUnless(m.args[0] == self.nick) def testLast(self): self.feedMsg('foo bar baz')