{"action":"created","issue":{"url":"https://api.github.com/repos/Yaribz/SPADS/issues/10","labels_url":"https://api.github.com/repos/Yaribz/SPADS/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/Yaribz/SPADS/issues/10/comments","events_url":"https://api.github.com/repos/Yaribz/SPADS/issues/10/events","html_url":"https://github.com/Yaribz/SPADS/pull/10","id":115069455,"number":10,"title":"Add beforeStart($automatic,$force) callin:","user":{"login":"springjools","id":5911982,"avatar_url":"https://avatars.githubusercontent.com/u/5911982?v=3","gravatar_id":"","url":"https://api.github.com/users/springjools","html_url":"https://github.com/springjools","followers_url":"https://api.github.com/users/springjools/followers","following_url":"https://api.github.com/users/springjools/following{/other_user}","gists_url":"https://api.github.com/users/springjools/gists{/gist_id}","starred_url":"https://api.github.com/users/springjools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/springjools/subscriptions","organizations_url":"https://api.github.com/users/springjools/orgs","repos_url":"https://api.github.com/users/springjools/repos","events_url":"https://api.github.com/users/springjools/events{/privacy}","received_events_url":"https://api.github.com/users/springjools/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-04T14:50:52Z","updated_at":"2015-11-07T19:50:06Z","closed_at":"2015-11-06T22:13:59Z","pull_request":{"url":"https://api.github.com/repos/Yaribz/SPADS/pulls/10","html_url":"https://github.com/Yaribz/SPADS/pull/10","diff_url":"https://github.com/Yaribz/SPADS/pull/10.diff","patch_url":"https://github.com/Yaribz/SPADS/pull/10.patch"},"body":"beforeStart($automatic,$force)\r\n\r\nThis callback is called each time a before the SPADS launchgame command is going to be executed.\r\n\r\nIt must return 0 to prevent the command from being treated by other plugins and executed by SPADS core, or 1 to allow it.\r\n\r\nTested with this countdown  http://pastebin.com/PMsMDzGP spads plugin or elderberry autohost,  which adds a 5 second countdown before allowing the game to launch. Tested with returning both 0 and 1. The only issue is line 42 with :\r\n\r\n$automatic = 0 if (!$automatic);\r\n\r\n, which is a bit hacky, but without it the $automatic variable will not be initialised and there will be a warning in slog."},"comment":{"url":"https://api.github.com/repos/Yaribz/SPADS/issues/comments/154743015","html_url":"https://github.com/Yaribz/SPADS/pull/10#issuecomment-154743015","issue_url":"https://api.github.com/repos/Yaribz/SPADS/issues/10","id":154743015,"user":{"login":"Yaribz","id":5689935,"avatar_url":"https://avatars.githubusercontent.com/u/5689935?v=3","gravatar_id":"","url":"https://api.github.com/users/Yaribz","html_url":"https://github.com/Yaribz","followers_url":"https://api.github.com/users/Yaribz/followers","following_url":"https://api.github.com/users/Yaribz/following{/other_user}","gists_url":"https://api.github.com/users/Yaribz/gists{/gist_id}","starred_url":"https://api.github.com/users/Yaribz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yaribz/subscriptions","organizations_url":"https://api.github.com/users/Yaribz/orgs","repos_url":"https://api.github.com/users/Yaribz/repos","events_url":"https://api.github.com/users/Yaribz/events{/privacy}","received_events_url":"https://api.github.com/users/Yaribz/received_events","type":"User","site_admin":false},"created_at":"2015-11-07T19:50:06Z","updated_at":"2015-11-07T19:50:06Z","body":"If the game is being launched manually (through !start or !forceStart), yes"}}