mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +01:00
Added special 'me' handling to tell.
This commit is contained in:
parent
83cc3132ba
commit
fd294faeee
@ -429,6 +429,8 @@ class Misc(callbacks.Privmsg):
|
|||||||
your benefit here.
|
your benefit here.
|
||||||
"""
|
"""
|
||||||
(target, text) = privmsgs.getArgs(args, required=2)
|
(target, text) = privmsgs.getArgs(args, required=2)
|
||||||
|
if target.lower() == 'me':
|
||||||
|
target = msg.nick
|
||||||
if not ircutils.isNick(target) and not ircutils.isChannel(target):
|
if not ircutils.isNick(target) and not ircutils.isChannel(target):
|
||||||
irc.error('%s is not a valid nick or channel.' % target)
|
irc.error('%s is not a valid nick or channel.' % target)
|
||||||
return
|
return
|
||||||
|
@ -135,6 +135,8 @@ class MiscTestCase(ChannelPluginTestCase, PluginDocumentation):
|
|||||||
m = self.getMsg('tell #foo [plugin tell]')
|
m = self.getMsg('tell #foo [plugin tell]')
|
||||||
self.failUnless(m.args[0] == '#foo')
|
self.failUnless(m.args[0] == '#foo')
|
||||||
self.failUnless('Misc' in m.args[1])
|
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):
|
def testLast(self):
|
||||||
self.feedMsg('foo bar baz')
|
self.feedMsg('foo bar baz')
|
||||||
|
Loading…
Reference in New Issue
Block a user