From 04ea1d8585353e4992c9f44aba759bba7e1cfd19 Mon Sep 17 00:00:00 2001 From: Arcidayne <9382522b@opayq.com> Date: Tue, 22 Dec 2015 17:48:07 -0800 Subject: [PATCH] New update function --- Epic_Not_Here_Counter/Epic_Not_Here_Counter.xml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Epic_Not_Here_Counter/Epic_Not_Here_Counter.xml b/Epic_Not_Here_Counter/Epic_Not_Here_Counter.xml index 20c5953..44c9175 100644 --- a/Epic_Not_Here_Counter/Epic_Not_Here_Counter.xml +++ b/Epic_Not_Here_Counter/Epic_Not_Here_Counter.xml @@ -15,11 +15,11 @@ save_state="y" date_written="2015-10-25 12:00:38" requires="4.00" - version="2.0" + version="2.1" > @@ -229,14 +229,7 @@ function update_plugin () async_ok, async = pcall (require, "async") if async_ok then - plugin_page = async.request(raw, "HTTPS") - end - - retval, page, status, headers, full_status = plugin_page:join() - plugin_page = nil - - if status == 200 then - raw_version = tonumber(string.match(page, '%s%s+version="([0-9%.]+)"')) -- Pulls version number + 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%.]+)"', "HTTPS") end if raw_version == pversion then