a new command: kotki
This commit is contained in:
parent
951950a7b2
commit
2076d8fe35
1 changed files with 11 additions and 0 deletions
11
plugins/commands/kotki.rb
Normal file
11
plugins/commands/kotki.rb
Normal 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']
|
||||
}
|
Loading…
Reference in a new issue