{"action":"created","issue":{"url":"https://api.github.com/repos/GetDotaStats/stat-collection/issues/25","labels_url":"https://api.github.com/repos/GetDotaStats/stat-collection/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/GetDotaStats/stat-collection/issues/25/comments","events_url":"https://api.github.com/repos/GetDotaStats/stat-collection/issues/25/events","html_url":"https://github.com/GetDotaStats/stat-collection/issues/25","id":107914542,"number":25,"title":"hostSteamID32 reported is not accurate","user":{"login":"jimmydorry","id":5135141,"avatar_url":"https://avatars.githubusercontent.com/u/5135141?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmydorry","html_url":"https://github.com/jimmydorry","followers_url":"https://api.github.com/users/jimmydorry/followers","following_url":"https://api.github.com/users/jimmydorry/following{/other_user}","gists_url":"https://api.github.com/users/jimmydorry/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmydorry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmydorry/subscriptions","organizations_url":"https://api.github.com/users/jimmydorry/orgs","repos_url":"https://api.github.com/users/jimmydorry/repos","events_url":"https://api.github.com/users/jimmydorry/events{/privacy}","received_events_url":"https://api.github.com/users/jimmydorry/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GetDotaStats/stat-collection/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"SinZ163","id":767456,"avatar_url":"https://avatars.githubusercontent.com/u/767456?v=3","gravatar_id":"","url":"https://api.github.com/users/SinZ163","html_url":"https://github.com/SinZ163","followers_url":"https://api.github.com/users/SinZ163/followers","following_url":"https://api.github.com/users/SinZ163/following{/other_user}","gists_url":"https://api.github.com/users/SinZ163/gists{/gist_id}","starred_url":"https://api.github.com/users/SinZ163/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SinZ163/subscriptions","organizations_url":"https://api.github.com/users/SinZ163/orgs","repos_url":"https://api.github.com/users/SinZ163/repos","events_url":"https://api.github.com/users/SinZ163/events{/privacy}","received_events_url":"https://api.github.com/users/SinZ163/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-09-23T13:04:56Z","updated_at":"2015-10-19T14:10:50Z","closed_at":null,"body":"It appears to just grab the first slot in the lobby."},"comment":{"url":"https://api.github.com/repos/GetDotaStats/stat-collection/issues/comments/149224391","html_url":"https://github.com/GetDotaStats/stat-collection/issues/25#issuecomment-149224391","issue_url":"https://api.github.com/repos/GetDotaStats/stat-collection/issues/25","id":149224391,"user":{"login":"MNoya","id":401423,"avatar_url":"https://avatars.githubusercontent.com/u/401423?v=3","gravatar_id":"","url":"https://api.github.com/users/MNoya","html_url":"https://github.com/MNoya","followers_url":"https://api.github.com/users/MNoya/followers","following_url":"https://api.github.com/users/MNoya/following{/other_user}","gists_url":"https://api.github.com/users/MNoya/gists{/gist_id}","starred_url":"https://api.github.com/users/MNoya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MNoya/subscriptions","organizations_url":"https://api.github.com/users/MNoya/orgs","repos_url":"https://api.github.com/users/MNoya/repos","events_url":"https://api.github.com/users/MNoya/events{/privacy}","received_events_url":"https://api.github.com/users/MNoya/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T14:10:50Z","updated_at":"2015-10-19T14:10:50Z","body":"Right now sendStage1 is doing `PlayerResource:GetSteamAccountID(0)`, in theory this should always be the host but if the playerIDs are actually just the game lobby order (before joining and deciding who has the better PC/Connection), it will require a for loop such as:\r\n\r\n```lua\r\nlocal hostID\r\nfor playerID = 0, DOTA_MAX_PLAYERS do\r\n    if PlayerResource:IsValidPlayerID(playerID) then\r\n        local player = PlayerResource:GetPlayer(playerID)\r\n        if GameRules:PlayerHasCustomGameHostPrivileges(player) then \r\n            hostID = playerID\r\n            return\r\n        end\r\n    end\r\nend\r\n```\r\n\r\nto determine who has the real host privileges."}}