Last active
October 10, 2024 18:46
-
-
Save centralhardware/2a12fbb4f7dce5c3db2cea4875899abc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function otr_init() | |
otr.log("example.lua starting; writing to /tmp/lua.out") | |
end | |
function otr_hook(topic, _type, data) | |
otr.log("curl -X POST -s 'http://10.168.0.77:7890/location?latitude=" .. data['lat'] .. "&longitude=" .. data['lon'] .. "&timezone=" .. data['tzname'] .. "&country=" .. data['cc'] .. "&userId=428985392" .. "'") | |
os.execute("curl -X POST -s 'http://10.168.0.77:7890/location?latitude=" .. data['lat'] .. "&longitude=" .. data['lon'] .. "&timezone=" .. data['tzname'] .. "&country=" .. data['cc'] .. "&userId=428985392" .. "'") | |
end | |
function otr_exit() | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment