repost/plugins/commands/kotki.rb

11 lines
258 B
Ruby
Raw Normal View History

2014-04-06 13:07:48 +00:00
require 'uri'
Client.register_command("kotki") { |args|
2014-04-06 13:11:09 +00:00
url = URI.parse(Config[:commands][:kotki][:url])
2014-04-06 13:07:48 +00:00
req = Net::HTTP::Get.new(url.path)
response = Net::HTTP.start(url.host, url.port) { |http| http.request(req) }
response['location']
}