mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +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 = '*'
|
||||
conn = dictclient.Connection('dict.org')
|
||||
definitions = conn.define(dictionary, word)
|
||||
dbs = [ircutils.bold(d.getdb().getname()) for d in definitions]
|
||||
dbs = sets.Set()
|
||||
if not definitions:
|
||||
irc.reply(msg, 'No definition for %r could be found.' % word)
|
||||
return
|
||||
L = []
|
||||
for d in definitions:
|
||||
dbs.add(ircutils.bold(d.getdb().getname()))
|
||||
(db, s) = (d.getdb().getname(), d.getdefstr())
|
||||
db = ircutils.bold(db)
|
||||
s = utils.normalizeWhitespace(s).rstrip(';.,')
|
||||
|
Loading…
Reference in New Issue
Block a user