mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +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)
|
||||
irc.queueMsg(ircmsgs.privmsg(channel, text))
|
||||
|
||||
def action(self, irc, msg, args):
|
||||
def do(self, irc, msg, args):
|
||||
"""<channel> <action>
|
||||
|
||||
Performs <action> in <channel>.
|
||||
|
@ -44,13 +44,13 @@ class AnonymousTestCase(ChannelPluginTestCase):
|
||||
conf.supybot.plugins.Anonymous.requireRegistration.setValue(orig)
|
||||
|
||||
def testAction(self):
|
||||
m = self.assertError('anonymous action %s loves you!' % self.channel)
|
||||
m = self.assertError('anonymous do %s loves you!' % self.channel)
|
||||
try:
|
||||
orig = conf.supybot.plugins.Anonymous.requireRegistration()
|
||||
conf.supybot.plugins.Anonymous.requireRegistration.setValue(False)
|
||||
m = self.assertNotError('anonymous action %s loves you!'%self.channel)
|
||||
self.failUnless(m.args == ircmsgs.action(self.channel,
|
||||
'loves you!').args)
|
||||
m = self.assertNotError('anonymous do %s loves you!'%self.channel)
|
||||
self.assertEqual(m.args, ircmsgs.action(self.channel,
|
||||
'loves you!').args)
|
||||
finally:
|
||||
conf.supybot.plugins.Anonymous.requireRegistration.setValue(orig)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user