mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-30 14:14:37 +01:00
Changed to more generic command names.
This commit is contained in:
parent
907979b284
commit
1037ade8cb
@ -62,28 +62,28 @@ def configure(onStart, afterConnect, advanced):
|
||||
if not utils.findBinaryInPath('zegrep'):
|
||||
if not advanced:
|
||||
print 'I can\'t find zegrep in your path. This is necessary '
|
||||
print 'to run the debfile command. I\'ll disable this command '
|
||||
print 'to run the file command. I\'ll disable this command '
|
||||
print 'now. When you get zegrep in your path, use the command '
|
||||
print '"enable debfile" to re-enable the command.'
|
||||
onStart.append('disable debfile')
|
||||
print '"enable file" to re-enable the command.'
|
||||
onStart.append('disable file')
|
||||
else:
|
||||
print 'I can\'t find zegrep in your path. If you want to run the '
|
||||
print 'debfile command with any sort of expediency, you\'ll need '
|
||||
print 'file command with any sort of expediency, you\'ll need '
|
||||
print 'it. You can use a python equivalent, but it\'s about two '
|
||||
print 'orders of magnitude slower. THIS MEANS IT WILL TAKE AGES '
|
||||
print 'TO RUN THIS COMMAND. Don\'t do this.'
|
||||
if yn('Do you want to use a Python equivalent of zegrep?') == 'y':
|
||||
onStart.append('usepythonzegrep')
|
||||
else:
|
||||
print 'I\'ll disable debfile now.'
|
||||
onStart.append('disable debfile')
|
||||
print 'I\'ll disable file now.'
|
||||
onStart.append('disable file')
|
||||
|
||||
example = utils.wrapLines("""
|
||||
<jemfinch> @list Debian
|
||||
<supybot> debfile, debian, debincoming, debversion, usepythonzegrep
|
||||
<supybot> file, debian, debincoming, debversion, usepythonzegrep
|
||||
<jemfinch> @debversion python
|
||||
<supybot> Total matches: 3, shown: 3. python 2.1.3-3.2 (stable), python 2.2.3-3 (testing), python 2.3-4 (unstable)
|
||||
<jemfinch> @debfile --exact /usr/bin/python
|
||||
<jemfinch> @file --exact /usr/bin/python
|
||||
<supybot> python/python, devel/crystalspace-dev, python/python1.5, python/python2.1, python/python2.1-popy, python/python2.2, python/python2.2-popy, python/python2.3, python/python2.3-popy, devel/sloccount, graphics/pythoncad, mail/pms
|
||||
""")
|
||||
|
||||
@ -114,7 +114,7 @@ class Debian(callbacks.Privmsg, plugins.PeriodicFileDownloader):
|
||||
self.usePythonZegrep = not self.usePythonZegrep
|
||||
irc.reply(msg, conf.replySuccess)
|
||||
|
||||
def debfile(self, irc, msg, args):
|
||||
def file(self, irc, msg, args):
|
||||
"""[--{regexp,exact}=<value>] [<glob>]
|
||||
|
||||
Returns packages in Debian that includes files matching <glob>. If
|
||||
@ -182,7 +182,7 @@ class Debian(callbacks.Privmsg, plugins.PeriodicFileDownloader):
|
||||
_debtablere = re.compile(r'<table[^>]*>(.*?)</table>', _debreflags)
|
||||
_debnumpkgsre = re.compile(r'out of total of (\d+)', _debreflags)
|
||||
_debBranches = ('stable', 'testing', 'unstable', 'experimental')
|
||||
def debversion(self, irc, msg, args):
|
||||
def version(self, irc, msg, args):
|
||||
"""[stable|testing|unstable|experimental] <package name>
|
||||
|
||||
Returns the current version(s) of a Debian package in the given branch
|
||||
@ -227,7 +227,7 @@ class Debian(callbacks.Privmsg, plugins.PeriodicFileDownloader):
|
||||
irc.reply(msg, resp)
|
||||
|
||||
_incomingRe = re.compile(r'<a href="(.*?\.deb)">', re.I)
|
||||
def debincoming(self, irc, msg, args):
|
||||
def incoming(self, irc, msg, args):
|
||||
"""[--{regexp,arch}=<value>] [<glob>]
|
||||
|
||||
Checks debian incoming for a matching package name. The arch
|
||||
|
@ -59,7 +59,7 @@ example = utils.wrapLines("""
|
||||
<supybot> jemfinch: 66.35.250.150
|
||||
<jemfinch> @dns 66.35.250.150
|
||||
<supybot> jemfinch: slashdot.org
|
||||
<jemfinch> @internic ohio-state.edu
|
||||
<jemfinch> @whois ohio-state.edu
|
||||
<supybot> jemfinch: ohio-state.edu <http://www.educause.edu/edudomain> is active; registered 18-aug-1987, updated 19-aug-2003, expires 18-aug-2004.
|
||||
""")
|
||||
|
||||
@ -88,7 +88,7 @@ class Network(callbacks.Privmsg):
|
||||
irc.reply(msg, 'Host not found.')
|
||||
|
||||
_tlds = sets.Set(['com', 'net', 'edu'])
|
||||
def internic(self, irc, msg, args):
|
||||
def whois(self, irc, msg, args):
|
||||
"""<domain>
|
||||
|
||||
Returns WHOIS information on the registration of <domain>. <domain>
|
||||
|
@ -38,9 +38,9 @@ class NetworkTestCase(PluginTestCase, PluginDocumentation):
|
||||
self.assertResponse('dns alsdkjfaslkdfjaslkdfj.com', 'Host not found.')
|
||||
|
||||
def testWhois(self):
|
||||
self.assertNotError('internic ohio-state.edu')
|
||||
self.assertError('internic www.ohio-state.edu')
|
||||
self.assertError('internic slashdot.org')
|
||||
self.assertNotError('network whois ohio-state.edu')
|
||||
self.assertError('network whois www.ohio-state.edu')
|
||||
self.assertError('network whois slashdot.org')
|
||||
|
||||
|
||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||
|
Loading…
Reference in New Issue
Block a user