a new command: kotki

master
Robert Gerus 2014-04-06 15:07:48 +02:00
parent 951950a7b2
commit 2076d8fe35
1 changed files with 11 additions and 0 deletions

11
plugins/commands/kotki.rb Normal file
View File

@ -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']
}