From 966b397c1cd3a50d913fadf0b66659cfd1d4a760 Mon Sep 17 00:00:00 2001 From: Arcidayne <9382522b@opayq.com> Date: Tue, 22 Dec 2015 17:53:45 -0800 Subject: [PATCH] Fixed updater --- Epic_Not_Here_Counter/Epic_Not_Here_Counter.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Epic_Not_Here_Counter/Epic_Not_Here_Counter.xml b/Epic_Not_Here_Counter/Epic_Not_Here_Counter.xml index eb6b4fd..0c85aed 100644 --- a/Epic_Not_Here_Counter/Epic_Not_Here_Counter.xml +++ b/Epic_Not_Here_Counter/Epic_Not_Here_Counter.xml @@ -229,12 +229,12 @@ function update_plugin () async_ok, async = pcall (require, "async") if async_ok then - plugin_page = async.doAsyncRemoteRequest(raw, function(retval, page, status, headers, full_status, request_url) if status == 200 then raw_version = tonumber(page:match('%s%s+version="([0-9%.]+)"') end end, "HTTPS") + plugin_page = async.doAsyncRemoteRequest(raw, function(retval, page, status, headers, full_status, request_url) if status == 200 then raw_version = page:match('%s%s+version="([0-9%.]+)"') end end, "HTTPS") end - if raw_version == pversion then + if tonumber(raw_version) == pversion then ColourNote("white", "blue", GetPluginInfo(pid, 1) .. " is up-to-date.") - elseif raw_version > pversion then + elseif to_number(raw_version) > pversion then ColourNote("white", "blue", "Updating from version " .. pversion .. " to " .. raw_version .. ". Do not touch anything.") local file = io.open(pfile, "w") file:write(page)