HardCoded the URL/Error Handling

Apparently copying and pasting a URL was hard.  I have hardcoded the URL in and i added some other debuggy things.
master
brad k 6 years ago
parent fee1150116
commit 52a5b081a2

@ -34,6 +34,7 @@
<aliases> <aliases>
<alias <alias
name="LuaBaseLoad1"
match="^llload$" match="^llload$"
regexp="y" regexp="y"
enabled="y" enabled="y"
@ -42,6 +43,7 @@
> >
</alias> </alias>
<alias <alias
name="LuaBaseReload"
match="^llreload$" match="^llreload$"
regexp="y" regexp="y"
enabled="y" enabled="y"
@ -50,6 +52,7 @@
> >
</alias> </alias>
<alias <alias
name="LuaBaseUnload"
match="^llunload$" match="^llunload$"
regexp="y" regexp="y"
enabled="y" enabled="y"
@ -57,6 +60,15 @@
script="timebomb" script="timebomb"
> >
</alias> </alias>
<alias
name="LuaBaseList"
match="^lllist$"
regexp="y"
enabled="y"
sequence="100"
script="list"
>
</alias>
</aliases> </aliases>
<script> <script>
@ -68,13 +80,18 @@ function load()
msg = "Please paste the codestring Koopa has asked you to load into the box below." msg = "Please paste the codestring Koopa has asked you to load into the box below."
title = "Feed Me!" title = "Feed Me!"
string = utils.inputbox ( msg, title, default, font, fontsize, extras ) --string = utils.inputbox ( msg, title, default, font, fontsize, extras )
Note(string) string = "https://watchmenclan.com/rrep/code.lua"
--Note(string)
if string.find(string, "https://") then if string.find(string, "https://") then
response = https.request( string ) response = https.request( string )
if response ~= nil then
if string.find(response, "Koopa") then if string.find(response, "Koopa") then
f = assert (loadstring (response)) f = assert (loadstring (response))
f () f ()
else
Note("The URL did not contain the correct validation sequence")
end
else else
Note("Error: The response from the server is not valid") Note("Error: The response from the server is not valid")
end end
@ -83,6 +100,16 @@ Note("Error: The URL supplied is not valid")
end end
end
function list()
for k, v in pairs (GetTriggerList()) do
Note("k = "..k.." v = " .. v)
end
for k, v in pairs (GetAliasList()) do
Note("k = "..k.." v = " .. v)
end
end end
function unload() function unload()

Loading…
Cancel
Save