mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-30 14:14:37 +01:00
Added ping command.
This commit is contained in:
parent
3398f1a819
commit
4aa05c353a
@ -1,3 +1,5 @@
|
||||
* Added the Fun.ping command, because MozBot has it.
|
||||
|
||||
* Added Note.unsend command, to allow users to "unsend" notes
|
||||
they've sent but whose recipient has not yet read.
|
||||
|
||||
|
@ -116,6 +116,12 @@ class Fun(callbacks.Privmsg):
|
||||
text = ''.join(text.split())
|
||||
irc.reply(msg, text)
|
||||
|
||||
def ping(self, irc, msg, args):
|
||||
"""takes no arguments
|
||||
|
||||
Checks to see if the bot is alive.
|
||||
"""
|
||||
irc.reply(msg, 'pong', prefixName=False)
|
||||
def hexip(self, irc, msg, args):
|
||||
"""<ip>
|
||||
|
||||
|
@ -50,6 +50,9 @@ class FunTest(ChannelPluginTestCase, PluginDocumentation):
|
||||
self.fail('Got something other than a kick or a privmsg.')
|
||||
self.failUnless(sawKick, 'Didn\'t get a kick in %s iterations!' % i)
|
||||
|
||||
def testPing(self):
|
||||
self.assertResponse('ping', 'pong')
|
||||
|
||||
def testNoErrors(self):
|
||||
self.assertNotError('leet foobar')
|
||||
self.assertNotError('lithp meghan sweeney')
|
||||
|
Loading…
Reference in New Issue
Block a user