class UrbanPlugin < Plugin URBAN = 'http://www.urbandictionary.com/define.php?term=' def help( plugin, topic="") "urban [word] [n]: give the [n]th definition of [word] from urbandictionary.com. urbanday: give the word-of-the-day at urban" end def format_definition(total, num, word, desc, ex) "#{Bold}#{word} (#{num}/#{total})#{Bold}: " + desc.ircify_html(:limit => 300) + " " + "#{ex}".ircify_html(:limit => 100) end def get_def(m, word, n = nil) n = n ? n.to_i : 1 u = URBAN + URI.escape(word) u += '&skip=' + n.to_s if n s = @bot.httputil.get(u) notfound = s.match %r{