Compare commits

...

1 Commits

1 changed files with 14 additions and 0 deletions

View File

@ -68,6 +68,20 @@ class Priberam(callbacks.Plugin):
return
definitions = soup.find('div', {'id': 'resultados'}).find_all('p')
if (len(definitions) > 1):
if (position < len(definitions)):
nextPos = position + 1
splitStr = str(msg).split()
commandUsed = splitStr[3]
count = 4
while (count < len(splitStr)):
if (splitStr[count].strip('\n') == word):
break
else:
commandUsed = commandUsed + ' ' + splitStr[count]
count += 1
outputResultados = ("{0} definições encontradas; {1} {2} {3} para a próxima").format(len(definitions), commandUsed[1:], word, nextPos)
irc.reply(outputResultados, prefixNick=False)
if position > len(definitions):
return