mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-23 10:34:19 +01:00
Forgot to commit from chemistry.
This commit is contained in:
parent
062231bb4b
commit
9a2f80ae7b
@ -805,6 +805,7 @@ 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]
|
||||
if not definitions:
|
||||
irc.reply(msg, 'No definition for %r could be found.' % word)
|
||||
return
|
||||
@ -818,13 +819,11 @@ class FunCommands(callbacks.Privmsg):
|
||||
originalFirst = L[0]
|
||||
ircutils.shrinkList(L, '; ')
|
||||
if not L:
|
||||
irc.reply(msg, 'No definitions small enough to fit into an IRC ' \
|
||||
'message were found. Here\'s a chopped version: ' \
|
||||
+ originalFirst[:375])
|
||||
return
|
||||
s = '%s, %s shown: %s' % \
|
||||
(utils.nItems(len(definitions), 'result'), len(L), '; '.join(L))
|
||||
irc.reply(msg, s)
|
||||
irc.reply(msg, 'Chopped: %s' % originalFirst[:400])
|
||||
else:
|
||||
s = '%s responded, %s shown: %s' % \
|
||||
(utils.commaAndify(dbs), len(L), '; '.join(L))
|
||||
irc.reply(msg, s)
|
||||
dict = privmsgs.thread(dict)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user