mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-03-01 03:50:41 +01:00
Changed action to do; it's more consistent with 'say' (rather than 'privmsg') and MozBot's similar plugin.
This commit is contained in:
parent
498c3167e7
commit
9fa465ce09
@ -108,7 +108,7 @@ class Anonymous(callbacks.Privmsg):
|
|||||||
self.log.info('Saying %r in %s due to %s.', text, channel, msg.prefix)
|
self.log.info('Saying %r in %s due to %s.', text, channel, msg.prefix)
|
||||||
irc.queueMsg(ircmsgs.privmsg(channel, text))
|
irc.queueMsg(ircmsgs.privmsg(channel, text))
|
||||||
|
|
||||||
def action(self, irc, msg, args):
|
def do(self, irc, msg, args):
|
||||||
"""<channel> <action>
|
"""<channel> <action>
|
||||||
|
|
||||||
Performs <action> in <channel>.
|
Performs <action> in <channel>.
|
||||||
|
@ -44,12 +44,12 @@ class AnonymousTestCase(ChannelPluginTestCase):
|
|||||||
conf.supybot.plugins.Anonymous.requireRegistration.setValue(orig)
|
conf.supybot.plugins.Anonymous.requireRegistration.setValue(orig)
|
||||||
|
|
||||||
def testAction(self):
|
def testAction(self):
|
||||||
m = self.assertError('anonymous action %s loves you!' % self.channel)
|
m = self.assertError('anonymous do %s loves you!' % self.channel)
|
||||||
try:
|
try:
|
||||||
orig = conf.supybot.plugins.Anonymous.requireRegistration()
|
orig = conf.supybot.plugins.Anonymous.requireRegistration()
|
||||||
conf.supybot.plugins.Anonymous.requireRegistration.setValue(False)
|
conf.supybot.plugins.Anonymous.requireRegistration.setValue(False)
|
||||||
m = self.assertNotError('anonymous action %s loves you!'%self.channel)
|
m = self.assertNotError('anonymous do %s loves you!'%self.channel)
|
||||||
self.failUnless(m.args == ircmsgs.action(self.channel,
|
self.assertEqual(m.args, ircmsgs.action(self.channel,
|
||||||
'loves you!').args)
|
'loves you!').args)
|
||||||
finally:
|
finally:
|
||||||
conf.supybot.plugins.Anonymous.requireRegistration.setValue(orig)
|
conf.supybot.plugins.Anonymous.requireRegistration.setValue(orig)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user