def get_def(m, word, n = nil)
n = n ? n.to_i : 1
- u = URBAN + CGI.escape(word)
+ u = URBAN + URI.escape(word)
u += '&skip=' + n.to_s if n
s = @bot.httputil.get(u)
total ||= rv.size
- return m.reply "#{Bold}#{word}#{Bold} not found" if rv.empty?
+ return m.reply("#{Bold}#{word}#{Bold} not found") if rv.empty?
if notfound
- suggestions = rv.map { |s| "#{Underline}#{s[1]}#{Underline}" }.join(', ')
+ suggestions = rv.map { |s| Underline + s[1] + Underline }.uniq.join ', '
m.reply "#{Bold}#{word}#{Bold} not found. maybe you mean #{suggestions}?"
return
end