mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-24 03:29:28 +01:00
Made a set of the dbs that responded so each db only gets listed once.
This commit is contained in:
parent
9a2f80ae7b
commit
fff4a7d864
@ -805,12 +805,13 @@ class FunCommands(callbacks.Privmsg):
|
|||||||
dictionary = '*'
|
dictionary = '*'
|
||||||
conn = dictclient.Connection('dict.org')
|
conn = dictclient.Connection('dict.org')
|
||||||
definitions = conn.define(dictionary, word)
|
definitions = conn.define(dictionary, word)
|
||||||
dbs = [ircutils.bold(d.getdb().getname()) for d in definitions]
|
dbs = sets.Set()
|
||||||
if not definitions:
|
if not definitions:
|
||||||
irc.reply(msg, 'No definition for %r could be found.' % word)
|
irc.reply(msg, 'No definition for %r could be found.' % word)
|
||||||
return
|
return
|
||||||
L = []
|
L = []
|
||||||
for d in definitions:
|
for d in definitions:
|
||||||
|
dbs.add(ircutils.bold(d.getdb().getname()))
|
||||||
(db, s) = (d.getdb().getname(), d.getdefstr())
|
(db, s) = (d.getdb().getname(), d.getdefstr())
|
||||||
db = ircutils.bold(db)
|
db = ircutils.bold(db)
|
||||||
s = utils.normalizeWhitespace(s).rstrip(';.,')
|
s = utils.normalizeWhitespace(s).rstrip(';.,')
|
||||||
|
Loading…
Reference in New Issue
Block a user