oz
21e7d474be
messed around a lot with Util adding some stuff in there BotTools is fixed so join/part/stay should be working Markovian was configured to ignore certain content eg urls RawCmd is updated to actually spit back error messages, as well as inform people when they lack sufficien tACL Replace just had a <> wrapped around the nick URLThief is a new idea that just grabs urls as they come into chat along with a simple interface for getting random ones or regex to find other ones URLInfo moved to a disabled folder I created for disabled plugins as it conflicts with g1mp Artism as well is a new project, intended for playing ANSI art, as well as grabbing it from online and translating it with ansirc in real time. tcpbot just a symlink to extendobot. Next update: prolly gonna have a ton of ansi files in this bitch.
16 lines
359 B
Ruby
16 lines
359 B
Ruby
require 'open-uri'
|
|
require 'cinch'
|
|
require 'nokogiri'
|
|
class URLInfo
|
|
include Cinch::Plugin
|
|
listen_to :channel
|
|
|
|
def listen(m)
|
|
urls = URI.extract(m.message, ["http", "https"])
|
|
urls.map { |url|
|
|
page = Nokogiri::HTML(open(url,{ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE}))
|
|
m.reply("Title: " << page.css("title").text << " (via #{url})")
|
|
}
|
|
end
|
|
end
|