|
|
@ -48,7 +48,7 @@ function UpdatePlugin(pid, pfile, pversion, raw)
|
|
|
|
ColourNote("white", "blue", "You currently have the latest version!")
|
|
|
|
ColourNote("white", "blue", "You currently have the latest version!")
|
|
|
|
elseif tonumber(raw_version) > tonumber(pversion) then
|
|
|
|
elseif tonumber(raw_version) > tonumber(pversion) then
|
|
|
|
ColourNote("white", "blue", "Updating from " .. pversion .. " to " .. raw_version .. "!")
|
|
|
|
ColourNote("white", "blue", "Updating from " .. pversion .. " to " .. raw_version .. "!")
|
|
|
|
UnloadPlugin(pid)
|
|
|
|
--UnloadPlugin(pid)
|
|
|
|
local file = io.open(pfile, "w")
|
|
|
|
local file = io.open(pfile, "w")
|
|
|
|
file:write(page)
|
|
|
|
file:write(page)
|
|
|
|
file:close()
|
|
|
|
file:close()
|
|
|
@ -56,8 +56,8 @@ function UpdatePlugin(pid, pfile, pversion, raw)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
raw_version = nil
|
|
|
|
raw_version = nil
|
|
|
|
UnloadPlugin(GetPluginID())
|
|
|
|
--UnloadPlugin(GetPluginID())
|
|
|
|
os.remove(GetPluginInfo(GetPluginID(), 6))
|
|
|
|
--os.remove(GetPluginInfo(GetPluginID(), 6))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function OnPluginInstall()
|
|
|
|
function OnPluginInstall()
|
|
|
|