mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-20 01:19:26 +01:00
Added zen command.
This commit is contained in:
parent
442392b5ba
commit
36ecc4fcf6
@ -44,6 +44,7 @@ import sys
|
||||
import new
|
||||
import md5
|
||||
import sha
|
||||
import this
|
||||
import time
|
||||
import math
|
||||
import cmath
|
||||
@ -757,6 +758,15 @@ class FunCommands(callbacks.Privmsg):
|
||||
"""
|
||||
irc.reply(msg, random.sample(self._eightballs, 1)[0])
|
||||
|
||||
|
||||
_these = [str(s) for s in this.s.decode('rot13').splitlines() if s]
|
||||
def zen(self, irc, msg, args):
|
||||
"""takes no arguments.
|
||||
|
||||
Returns one of the zen of Python statements.
|
||||
"""
|
||||
irc.reply(msg, random.sample(self._these, 1)[0])
|
||||
|
||||
def dns(self, irc, msg, args):
|
||||
"""<host|ip>"""
|
||||
host = privmsgs.getArgs(args)
|
||||
|
@ -92,6 +92,9 @@ class FunCommandsTest(PluginTestCase):
|
||||
self.failUnless(m.args[0] == '#foo')
|
||||
self.failUnless('sbbone' in m.args[1])
|
||||
|
||||
def testZen(self):
|
||||
self.assertNotError('zen')
|
||||
|
||||
def testDns(self):
|
||||
self.assertNotError('dns slashdot.org')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user