Changed action to do; it's more consistent with 'say' (rather than 'privmsg') and MozBot's similar plugin.

This commit is contained in:
Jeremy Fincher 2004-09-10 06:24:30 +00:00
parent 498c3167e7
commit 9fa465ce09
2 changed files with 5 additions and 5 deletions

View File

@ -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>.

View File

@ -44,12 +44,12 @@ 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,
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)