Closed Nyyrazzilyss closed 1 year ago
cecho("Downloading current Katumi database.\n")
local saveto = getMudletHomeDir().."/toril.db"
local url = "http://www.grokh.com/toril.db"
downloadFile(saveto, url)
cecho("
@updatedb
cecho("
function katumiUpdate(k, v) -- k is function name. v is filename
if string.find(v, "toril.db") then
cecho("
copyFile(v, mainpath("toril.db"))
cecho("<green>Connecting to updated database.\n")
sqlOpen()
-- delete the downloaded file
os.remove(v)
end end
Download and update katumi database
Alias:
name: @updatedb pattern: ^@updatedb$
cecho("Downloading current Katumi database.\n")
downloadFile("toril.db", "http://www.grokh.com/toril.db")
Script:
name: katumiUpdate event: sysDownloadDone
function katumiUpdate(k, v) -- k is function name. v is filename
if v == "toril.db" then cecho("Katumi download completed.\n")
end end