From 1037ade8cbac65eae214f26dae397a6aca752674 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 21 Oct 2003 05:11:53 +0000 Subject: [PATCH] Changed to more generic command names. --- plugins/Debian.py | 22 +++++++++++----------- plugins/Network.py | 4 ++-- test/test_Network.py | 6 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/plugins/Debian.py b/plugins/Debian.py index bca89f27a..1528d481c 100644 --- a/plugins/Debian.py +++ b/plugins/Debian.py @@ -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(""" @list Debian - debfile, debian, debincoming, debversion, usepythonzegrep + file, debian, debincoming, debversion, usepythonzegrep @debversion python Total matches: 3, shown: 3. python 2.1.3-3.2 (stable), python 2.2.3-3 (testing), python 2.3-4 (unstable) - @debfile --exact /usr/bin/python + @file --exact /usr/bin/python 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}=] [] Returns packages in Debian that includes files matching . If @@ -182,7 +182,7 @@ class Debian(callbacks.Privmsg, plugins.PeriodicFileDownloader): _debtablere = re.compile(r']*>(.*?)', _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] 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'', re.I) - def debincoming(self, irc, msg, args): + def incoming(self, irc, msg, args): """[--{regexp,arch}=] [] Checks debian incoming for a matching package name. The arch diff --git a/plugins/Network.py b/plugins/Network.py index a5a27c7bc..844aef095 100644 --- a/plugins/Network.py +++ b/plugins/Network.py @@ -59,7 +59,7 @@ example = utils.wrapLines(""" jemfinch: 66.35.250.150 @dns 66.35.250.150 jemfinch: slashdot.org - @internic ohio-state.edu + @whois ohio-state.edu jemfinch: ohio-state.edu 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): """ Returns WHOIS information on the registration of . diff --git a/test/test_Network.py b/test/test_Network.py index 04bb0fd40..6eb9bb5a9 100644 --- a/test/test_Network.py +++ b/test/test_Network.py @@ -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: