12 lines
277 B
Ruby
12 lines
277 B
Ruby
|
require 'net/http'
|
||
|
require 'uri'
|
||
|
|
||
|
Client.register_command("kotki") { |args|
|
||
|
url = URL.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']
|
||
|
}
|