mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 06:00:42 +01:00
commands.wrap update
This commit is contained in:
parent
c6afe40abc
commit
38ee295f8e
@ -50,12 +50,13 @@ import getopt
|
|||||||
import socket
|
import socket
|
||||||
import urllib
|
import urllib
|
||||||
import xml.dom.minidom
|
import xml.dom.minidom
|
||||||
|
|
||||||
from itertools import imap, ifilter
|
from itertools import imap, ifilter
|
||||||
|
|
||||||
import supybot.fix as fix
|
import supybot.fix as fix
|
||||||
import supybot.conf as conf
|
import supybot.conf as conf
|
||||||
import supybot.utils as utils
|
import supybot.utils as utils
|
||||||
from supybot.commands import wrap
|
from supybot.commands import *
|
||||||
import supybot.webutils as webutils
|
import supybot.webutils as webutils
|
||||||
import supybot.privmsgs as privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import supybot.registry as registry
|
import supybot.registry as registry
|
||||||
@ -159,17 +160,17 @@ class Geekquote(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
self._gkBackend(irc, msg, site, id)
|
self._gkBackend(irc, msg, site, id)
|
||||||
geekSnarfer = wrap(geekSnarfer, decorators=['urlSnarfer'])
|
geekSnarfer = wrap(geekSnarfer, decorators=['urlSnarfer'])
|
||||||
|
|
||||||
def geekquote(self, irc, msg, args):
|
def geekquote(self, irc, msg, args, id):
|
||||||
"""[<id>]
|
"""[<id>]
|
||||||
|
|
||||||
Returns a random geek quote from bash.org; the optional argument
|
Returns a random geek quote from bash.org; the optional argument
|
||||||
<id> specifies which quote to retrieve.
|
<id> specifies which quote to retrieve.
|
||||||
"""
|
"""
|
||||||
id = privmsgs.getArgs(args, required=0, optional=1)
|
|
||||||
site = 'bash.org'
|
site = 'bash.org'
|
||||||
self._gkBackend(irc, msg, site, id)
|
self._gkBackend(irc, msg, site, id)
|
||||||
|
geekquote = wrap(geekquote, [optional(('id', 'geekquote'))])
|
||||||
|
|
||||||
def qdb(self, irc, msg, args):
|
def qdb(self, irc, msg, args, id):
|
||||||
"""[<id>]
|
"""[<id>]
|
||||||
|
|
||||||
Returns a random geek quote from qdb.us; the optional argument
|
Returns a random geek quote from qdb.us; the optional argument
|
||||||
@ -178,6 +179,7 @@ class Geekquote(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
id = privmsgs.getArgs(args, required=0, optional=1)
|
id = privmsgs.getArgs(args, required=0, optional=1)
|
||||||
site = 'qdb.us'
|
site = 'qdb.us'
|
||||||
self._gkBackend(irc, msg, site, id)
|
self._gkBackend(irc, msg, site, id)
|
||||||
|
qdb = wrap(qdb, [optional(('id', 'qdb'))])
|
||||||
|
|
||||||
Class = Geekquote
|
Class = Geekquote
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user