new plugin curl_head.lua
This commit is contained in:
parent
3a0b3663a8
commit
99afa43f50
20
plugins/curl_head.lua
Normal file
20
plugins/curl_head.lua
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
function run(msg, matches)
|
||||||
|
local receiver = get_receiver(msg)
|
||||||
|
local URL = matches[1]
|
||||||
|
if string.match(msg.text, '"') then
|
||||||
|
return 'Vergiss es'
|
||||||
|
end
|
||||||
|
|
||||||
|
if string.match(msg.text, '/[Hh][Ee][Aa][Dd]') then
|
||||||
|
text = run_bash('curl --head --insecure ' .. URL)
|
||||||
|
send_msg(receiver, text, ok_cb, false)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
description = "Führt Befehle in der Konsole aus",
|
||||||
|
usage = {""},
|
||||||
|
patterns = {"^/[Hh][Ee][Aa][Dd] (https?://[%w-_%.%?%.:/%+=&]+)$"},
|
||||||
|
run = run
|
||||||
|
}
|
Reference in New Issue
Block a user