Skip to content
Snippets Groups Projects
Commit 49bc9e57 authored by DarkGod's avatar DarkGod
Browse files

steam news & overlay

parent e62e208b
No related branches found
No related tags found
No related merge requests found
......@@ -552,10 +552,12 @@ end
-- Orders for the profile thread
-----------------------------------------------------------------------
function _M:getNews(callback)
function _M:getNews(callback, steam)
print("[ONLINE PROFILE] get news")
self.evt_cbs.GetNews = callback
core.profile.pushOrder("o='GetNews'")
if not steam then core.profile.pushOrder("o='GetNews'")
else core.profile.pushOrder("o='GetNews' steam=true")
end
end
function _M:tryAuth()
......
......@@ -1958,6 +1958,8 @@ function util.uuid()
end
function util.browserOpenUrl(url)
if core.steam and core.steam.openOverlayUrl(url) then return true end
local tries = {
"rundll32 url.dll,FileProtocolHandler %s", -- Windows
"open %s", -- OSX
......
......@@ -487,7 +487,7 @@ function _M:serverNews()
self.news = news
self:updateNews()
end
end)
end, core.steam and true or false)
while not stop do coroutine.yield() end
end)
......
......@@ -299,7 +299,9 @@ function _M:orderLogoff(o)
end
function _M:orderGetNews(o)
self:command("NEWS")
if o.steam then self:command("NEWS", "STEAM")
else self:command("NEWS")
end
if self:read("200") then
local _, _, size, title = self.last_line:find("^([0-9]+) (.*)")
size = tonumber(size)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment