{"action":"created","issue":{"url":"https://api.github.com/repos/otland/forgottenserver/issues/2008","repository_url":"https://api.github.com/repos/otland/forgottenserver","labels_url":"https://api.github.com/repos/otland/forgottenserver/issues/2008/labels{/name}","comments_url":"https://api.github.com/repos/otland/forgottenserver/issues/2008/comments","events_url":"https://api.github.com/repos/otland/forgottenserver/issues/2008/events","html_url":"https://github.com/otland/forgottenserver/issues/2008","id":191719553,"number":2008,"title":"[Question] Passing userdata to event","user":{"login":"totolol123","id":5634493,"avatar_url":"https://avatars.githubusercontent.com/u/5634493?v=3","gravatar_id":"","url":"https://api.github.com/users/totolol123","html_url":"https://github.com/totolol123","followers_url":"https://api.github.com/users/totolol123/followers","following_url":"https://api.github.com/users/totolol123/following{/other_user}","gists_url":"https://api.github.com/users/totolol123/gists{/gist_id}","starred_url":"https://api.github.com/users/totolol123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/totolol123/subscriptions","organizations_url":"https://api.github.com/users/totolol123/orgs","repos_url":"https://api.github.com/users/totolol123/repos","events_url":"https://api.github.com/users/totolol123/events{/privacy}","received_events_url":"https://api.github.com/users/totolol123/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-25T15:02:55Z","updated_at":"2016-11-25T16:49:57Z","closed_at":null,"body":"As title says, is safe to do this:\r\n```lua\r\n    addEvent(function(player) if player then player:something... end end, time, player)\r\n```\r\nOr we should do only this:\r\n```lua\r\n    addEvent(function(cid) local player = Player(cid) if player then player:something... end end, time, player:getId())\r\n```"},"comment":{"url":"https://api.github.com/repos/otland/forgottenserver/issues/comments/262995861","html_url":"https://github.com/otland/forgottenserver/issues/2008#issuecomment-262995861","issue_url":"https://api.github.com/repos/otland/forgottenserver/issues/2008","id":262995861,"user":{"login":"ninjalulz","id":2553972,"avatar_url":"https://avatars.githubusercontent.com/u/2553972?v=3","gravatar_id":"","url":"https://api.github.com/users/ninjalulz","html_url":"https://github.com/ninjalulz","followers_url":"https://api.github.com/users/ninjalulz/followers","following_url":"https://api.github.com/users/ninjalulz/following{/other_user}","gists_url":"https://api.github.com/users/ninjalulz/gists{/gist_id}","starred_url":"https://api.github.com/users/ninjalulz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninjalulz/subscriptions","organizations_url":"https://api.github.com/users/ninjalulz/orgs","repos_url":"https://api.github.com/users/ninjalulz/repos","events_url":"https://api.github.com/users/ninjalulz/events{/privacy}","received_events_url":"https://api.github.com/users/ninjalulz/received_events","type":"User","site_admin":false},"created_at":"2016-11-25T16:49:57Z","updated_at":"2016-11-25T16:49:57Z","body":"No, it's not safe at all. Userdata objects aren't set to nil whenever the memory is free'd (e.g. player logs out) so passing an object to addEvent isn't in your best interest.\r\n\r\n\r\n"}}
{"actor":{"display_login":"ninjalulz"}}