summaryrefslogtreecommitdiffstats
path: root/plugins/commands/kotki.rb
blob: 0c144fd2b945ec93f80891d36e24c138660fecaf (plain)
1
2
3
4
5
6
7
8
9
10
11
require 'net/http'
require 'uri'

Client.register_command("kotki") { |args|
    url = URI.parse(Config[:commands][:kotki][:url])

    req = Net::HTTP::Get.new(url.path)
    response = Net::HTTP.start(url.host, url.port) { |http| http.request(req) }

    response['location']
}