From 0b7235b450f33b3878e6734a004fc60f53a4e16a Mon Sep 17 00:00:00 2001 From: insweater Date: Thu, 5 Feb 2015 17:48:26 +0300 Subject: [PATCH] Add pingSession --- gamejolt.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gamejolt.lua b/gamejolt.lua index 2e7c301..97d312a 100644 --- a/gamejolt.lua +++ b/gamejolt.lua @@ -41,4 +41,11 @@ function GJ.openSession() return string.find(req("sessions/open/?", "dump", true, true), "SUCCESS") ~= nil end +function GJ.pingSession(active) + local status = "idle" + if active then status = "active" end + + return string.find(req("sessions/open/?status=" .. status, "dump", true, true), "SUCCESS") ~= nil +end + return GJ \ No newline at end of file