a new command: kotki
parent
951950a7b2
commit
2076d8fe35
|
@ -0,0 +1,11 @@
|
|||
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']
|
||||
}
|
Loading…
Reference in New Issue