PackageInfo: Fix regression from previous commit.
This commit is contained in:
parent
4509317daf
commit
fa6be1af5a
|
@ -22,8 +22,8 @@ import supybot
|
||||||
import supybot.world as world
|
import supybot.world as world
|
||||||
from imp import reload
|
from imp import reload
|
||||||
|
|
||||||
__version__ = "2.0.0"
|
__version__ = "2.0.1"
|
||||||
__author__ = supybot.Author("Krytarik Raido", "krytarik", "krytarik@tuxgarage.com")
|
__author__ = supybot.Author("Krytarik Raido", "krytarik", "krytarik@gmail.com")
|
||||||
__contributors__ = {
|
__contributors__ = {
|
||||||
supybot.Author("Dennis Kaarsemaker", "Seveas", "dennis@kaarsemaker.net"): ['Original Concept'],
|
supybot.Author("Dennis Kaarsemaker", "Seveas", "dennis@kaarsemaker.net"): ['Original Concept'],
|
||||||
supybot.Author("Terence Simpson", "tsimpson", "tsimpson@ubuntu.com"): ['Original Author']
|
supybot.Author("Terence Simpson", "tsimpson", "tsimpson@ubuntu.com"): ['Original Author']
|
||||||
|
|
|
@ -136,7 +136,7 @@ class PackageInfo(callbacks.Plugin):
|
||||||
|
|
||||||
return (target, prefix + reply)
|
return (target, prefix + reply)
|
||||||
|
|
||||||
def real_info(self, irc, msg, args, package, release=None):
|
def info(self, irc, msg, args, package, release=None):
|
||||||
"""<[src:]package> [<release>]
|
"""<[src:]package> [<release>]
|
||||||
|
|
||||||
Look up information for <package>, optionally in <release>
|
Look up information for <package>, optionally in <release>
|
||||||
|
@ -153,9 +153,9 @@ class PackageInfo(callbacks.Plugin):
|
||||||
if rest:
|
if rest:
|
||||||
(target, reply) = self.__handleRest(irc, msg, target, reply, rest)
|
(target, reply) = self.__handleRest(irc, msg, target, reply, rest)
|
||||||
queue(irc, target, reply)
|
queue(irc, target, reply)
|
||||||
info = wrap(real_info, ['anything', optional('text')])
|
info = wrap(info, ['anything', optional('text')])
|
||||||
|
|
||||||
def real_depends(self, irc, msg, args, package, release=None):
|
def depends(self, irc, msg, args, package, release=None):
|
||||||
"""<[src:]package> [<release>]
|
"""<[src:]package> [<release>]
|
||||||
|
|
||||||
Look up dependencies for <package>, optionally in <release>
|
Look up dependencies for <package>, optionally in <release>
|
||||||
|
@ -172,9 +172,9 @@ class PackageInfo(callbacks.Plugin):
|
||||||
if rest:
|
if rest:
|
||||||
(target, reply) = self.__handleRest(irc, msg, target, reply, rest)
|
(target, reply) = self.__handleRest(irc, msg, target, reply, rest)
|
||||||
queue(irc, target, reply)
|
queue(irc, target, reply)
|
||||||
depends = wrap(real_depends, ['anything', optional('text')])
|
depends = wrap(depends, ['anything', optional('text')])
|
||||||
|
|
||||||
def real_find(self, irc, msg, args, package, release=None):
|
def find(self, irc, msg, args, package, release=None):
|
||||||
"""<package/filename> [<release>]
|
"""<package/filename> [<release>]
|
||||||
|
|
||||||
Search for <package> or, if that fails, <filename> in packages,
|
Search for <package> or, if that fails, <filename> in packages,
|
||||||
|
@ -191,7 +191,7 @@ class PackageInfo(callbacks.Plugin):
|
||||||
if rest:
|
if rest:
|
||||||
(target, reply) = self.__handleRest(irc, msg, target, reply, rest)
|
(target, reply) = self.__handleRest(irc, msg, target, reply, rest)
|
||||||
queue(irc, target, reply)
|
queue(irc, target, reply)
|
||||||
find = wrap(real_find, ['anything', optional('text')])
|
find = wrap(find, ['anything', optional('text')])
|
||||||
|
|
||||||
def doPrivmsg(self, irc, msg):
|
def doPrivmsg(self, irc, msg):
|
||||||
if chr(1) in msg.args[1]: # CTCP
|
if chr(1) in msg.args[1]: # CTCP
|
||||||
|
@ -212,8 +212,8 @@ class PackageInfo(callbacks.Plugin):
|
||||||
cmd = cmd.lower()
|
cmd = cmd.lower()
|
||||||
if not (cmd in ("info", "depends", "find") and rest):
|
if not (cmd in ("info", "depends", "find") and rest):
|
||||||
return
|
return
|
||||||
(package, release) = (rest.split(None, 1) + [None])[:2]
|
(package, release) = (rest.split(None, 1) + [''])[:2]
|
||||||
irc = callbacks.NestedCommandsIrcProxy(irc, msg, [cmd, package, release])
|
callbacks.NestedCommandsIrcProxy(irc, msg, [cmd, package, release])
|
||||||
|
|
||||||
def inFilter(self, irc, msg):
|
def inFilter(self, irc, msg):
|
||||||
if not (msg.prefix and msg.args):
|
if not (msg.prefix and msg.args):
|
||||||
|
|
Loading…
Reference in New Issue