###
+import supybot.conf as conf
import supybot.utils as utils
from supybot.commands import *
import supybot.plugins as plugins
self.__parent = super(Pokedex, self)
self.__parent.__init__(irc)
self.db = pokedex.db.connect(self.registryValue('databaseURL'))
+ self.indices = pokedex.lookup.open_index(
+ directory=conf.supybot.directories.data.dirize('pokedex-index'),
+ session=self.db,
+ )
def pokedex(self, irc, msg, args, thing):
"""<thing...>
Looks up <thing> in the veekun Pokédex."""
# Similar logic to the site, here.
- results = pokedex.lookup.lookup(thing, session=self.db)
+ results = pokedex.lookup.lookup(thing, session=self.db,
+ indices=self.indices)
# Nothing found
if len(results) == 0: