Initial commit
This commit is contained in:
commit
81b25c7ebe
21
cclink.lua
Normal file
21
cclink.lua
Normal file
@ -0,0 +1,21 @@
|
||||
BASE_URL="https://node.protogen.io/secret-endpoint"
|
||||
WEBHOOKS={
|
||||
-- wehbook when powered
|
||||
[true] = BASE_URL .. "/ping",
|
||||
-- wehbook when unpowered
|
||||
[false] = BASE_URL .. "/",
|
||||
}
|
||||
-- example
|
||||
-- PAYLOAD="meow! :3"
|
||||
PAYLOAD=nil
|
||||
|
||||
while true do
|
||||
state=false
|
||||
os.pullEvent("redstone")
|
||||
for _, v in pairs(redstone.getSides()) do
|
||||
if redstone.getInput(v) == true then
|
||||
state=true
|
||||
end
|
||||
end
|
||||
http.request(WEBHOOKS[state], PAYLOAD)
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user