{"action":"opened","number":529,"pull_request":{"url":"https://api.github.com/repos/alliedmodders/sourcemod/pulls/529","id":78238637,"html_url":"https://github.com/alliedmodders/sourcemod/pull/529","diff_url":"https://github.com/alliedmodders/sourcemod/pull/529.diff","patch_url":"https://github.com/alliedmodders/sourcemod/pull/529.patch","issue_url":"https://api.github.com/repos/alliedmodders/sourcemod/issues/529","number":529,"state":"open","locked":false,"title":"Keep optional natives optional after reloading","user":{"login":"peace-maker","id":1635147,"avatar_url":"https://avatars.githubusercontent.com/u/1635147?v=3","gravatar_id":"","url":"https://api.github.com/users/peace-maker","html_url":"https://github.com/peace-maker","followers_url":"https://api.github.com/users/peace-maker/followers","following_url":"https://api.github.com/users/peace-maker/following{/other_user}","gists_url":"https://api.github.com/users/peace-maker/gists{/gist_id}","starred_url":"https://api.github.com/users/peace-maker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peace-maker/subscriptions","organizations_url":"https://api.github.com/users/peace-maker/orgs","repos_url":"https://api.github.com/users/peace-maker/repos","events_url":"https://api.github.com/users/peace-maker/events{/privacy}","received_events_url":"https://api.github.com/users/peace-maker/received_events","type":"User","site_admin":false},"body":"Bug 6518\r\n\r\nStarting from no plugins loaded, after the final step of the following,\r\nbasetriggers will be marked as errored because mapchooser is missing:\r\n\r\nLoad basetriggers\r\nLoad mapchooser\r\nUnload mapchooser\r\nLoad mapchooser\r\nUnload mapchooser\r\n\r\nWe lose the SP_NTVFLAG_OPTIONAL when removing a WeakNative. The\r\n__pl_mapchooser_SetNTVOptional() is only called in basetriggers when it\r\nis loaded. It adds the OPTIONAL flag to the mapchooser natives the\r\nbasetrigger plugin uses.\r\nWhen mapchooser is loaded, the native is overwritten and the OPTIONAL\r\nflag consumed (WeakNative registered), but not preserved. Later when\r\nmapchooser is unloaded the WeakNative is removed in\r\nCNativeOwner::UnbindWeakRef, but the OPTIONAL flag isn't added again.\r\nThe next time mapchooser is loaded, the natives aren't optional anymore\r\nand will cause a real dependency.\r\n\r\nThe change in ShareSys isn't needed to fix the error, but is included to\r\nkeep the SP_NTVFLAG_OPTIONAL flag consistent.","created_at":"2016-07-20T23:54:32Z","updated_at":"2016-07-20T23:54:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"91da4e7cf9cd12797524c8d01fb94a53b871954c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/alliedmodders/sourcemod/pulls/529/commits","review_comments_url":"https://api.github.com/repos/alliedmodders/sourcemod/pulls/529/comments","review_comment_url":"https://api.github.com/repos/alliedmodders/sourcemod/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alliedmodders/sourcemod/issues/529/comments","statuses_url":"https://api.github.com/repos/alliedmodders/sourcemod/statuses/2c8614c639fe5f2d6cc5e74cac6562203eb6a663","head":{"label":"peace-maker:optional_natives","ref":"optional_natives","sha":"2c8614c639fe5f2d6cc5e74cac6562203eb6a663","user":{"login":"peace-maker","id":1635147,"avatar_url":"https://avatars.githubusercontent.com/u/1635147?v=3","gravatar_id":"","url":"https://api.github.com/users/peace-maker","html_url":"https://github.com/peace-maker","followers_url":"https://api.github.com/users/peace-maker/followers","following_url":"https://api.github.com/users/peace-maker/following{/other_user}","gists_url":"https://api.github.com/users/peace-maker/gists{/gist_id}","starred_url":"https://api.github.com/users/peace-maker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peace-maker/subscriptions","organizations_url":"https://api.github.com/users/peace-maker/orgs","repos_url":"https://api.github.com/users/peace-maker/repos","events_url":"https://api.github.com/users/peace-maker/events{/privacy}","received_events_url":"https://api.github.com/users/peace-maker/received_events","type":"User","site_admin":false},"repo":{"id":20215683,"name":"sourcemod","full_name":"peace-maker/sourcemod","owner":{"login":"peace-maker","id":1635147,"avatar_url":"https://avatars.githubusercontent.com/u/1635147?v=3","gravatar_id":"","url":"https://api.github.com/users/peace-maker","html_url":"https://github.com/peace-maker","followers_url":"https://api.github.com/users/peace-maker/followers","following_url":"https://api.github.com/users/peace-maker/following{/other_user}","gists_url":"https://api.github.com/users/peace-maker/gists{/gist_id}","starred_url":"https://api.github.com/users/peace-maker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peace-maker/subscriptions","organizations_url":"https://api.github.com/users/peace-maker/orgs","repos_url":"https://api.github.com/users/peace-maker/repos","events_url":"https://api.github.com/users/peace-maker/events{/privacy}","received_events_url":"https://api.github.com/users/peace-maker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/peace-maker/sourcemod","description":"SourceMod - Source Engine Scripting and Administration","fork":true,"url":"https://api.github.com/repos/peace-maker/sourcemod","forks_url":"https://api.github.com/repos/peace-maker/sourcemod/forks","keys_url":"https://api.github.com/repos/peace-maker/sourcemod/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peace-maker/sourcemod/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peace-maker/sourcemod/teams","hooks_url":"https://api.github.com/repos/peace-maker/sourcemod/hooks","issue_events_url":"https://api.github.com/repos/peace-maker/sourcemod/issues/events{/number}","events_url":"https://api.github.com/repos/peace-maker/sourcemod/events","assignees_url":"https://api.github.com/repos/peace-maker/sourcemod/assignees{/user}","branches_url":"https://api.github.com/repos/peace-maker/sourcemod/branches{/branch}","tags_url":"https://api.github.com/repos/peace-maker/sourcemod/tags","blobs_url":"https://api.github.com/repos/peace-maker/sourcemod/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peace-maker/sourcemod/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peace-maker/sourcemod/git/refs{/sha}","trees_url":"https://api.github.com/repos/peace-maker/sourcemod/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peace-maker/sourcemod/statuses/{sha}","languages_url":"https://api.github.com/repos/peace-maker/sourcemod/languages","stargazers_url":"https://api.github.com/repos/peace-maker/sourcemod/stargazers","contributors_url":"https://api.github.com/repos/peace-maker/sourcemod/contributors","subscribers_url":"https://api.github.com/repos/peace-maker/sourcemod/subscribers","subscription_url":"https://api.github.com/repos/peace-maker/sourcemod/subscription","commits_url":"https://api.github.com/repos/peace-maker/sourcemod/commits{/sha}","git_commits_url":"https://api.github.com/repos/peace-maker/sourcemod/git/commits{/sha}","comments_url":"https://api.github.com/repos/peace-maker/sourcemod/comments{/number}","issue_comment_url":"https://api.github.com/repos/peace-maker/sourcemod/issues/comments{/number}","contents_url":"https://api.github.com/repos/peace-maker/sourcemod/contents/{+path}","compare_url":"https://api.github.com/repos/peace-maker/sourcemod/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peace-maker/sourcemod/merges","archive_url":"https://api.github.com/repos/peace-maker/sourcemod/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peace-maker/sourcemod/downloads","issues_url":"https://api.github.com/repos/peace-maker/sourcemod/issues{/number}","pulls_url":"https://api.github.com/repos/peace-maker/sourcemod/pulls{/number}","milestones_url":"https://api.github.com/repos/peace-maker/sourcemod/milestones{/number}","notifications_url":"https://api.github.com/repos/peace-maker/sourcemod/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peace-maker/sourcemod/labels{/name}","releases_url":"https://api.github.com/repos/peace-maker/sourcemod/releases{/id}","deployments_url":"https://api.github.com/repos/peace-maker/sourcemod/deployments","created_at":"2014-05-27T10:11:11Z","updated_at":"2016-02-27T20:23:42Z","pushed_at":"2016-07-20T23:54:07Z","git_url":"git://github.com/peace-maker/sourcemod.git","ssh_url":"git@github.com:peace-maker/sourcemod.git","clone_url":"https://github.com/peace-maker/sourcemod.git","svn_url":"https://github.com/peace-maker/sourcemod","homepage":"http://www.sourcemod.net/","size":34819,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"alliedmodders:master","ref":"master","sha":"a34555c45db4f432fb5359da649e49e75abfef2b","user":{"login":"alliedmodders","id":6601917,"avatar_url":"https://avatars.githubusercontent.com/u/6601917?v=3","gravatar_id":"","url":"https://api.github.com/users/alliedmodders","html_url":"https://github.com/alliedmodders","followers_url":"https://api.github.com/users/alliedmodders/followers","following_url":"https://api.github.com/users/alliedmodders/following{/other_user}","gists_url":"https://api.github.com/users/alliedmodders/gists{/gist_id}","starred_url":"https://api.github.com/users/alliedmodders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alliedmodders/subscriptions","organizations_url":"https://api.github.com/users/alliedmodders/orgs","repos_url":"https://api.github.com/users/alliedmodders/repos","events_url":"https://api.github.com/users/alliedmodders/events{/privacy}","received_events_url":"https://api.github.com/users/alliedmodders/received_events","type":"Organization","site_admin":false},"repo":{"id":20145274,"name":"sourcemod","full_name":"alliedmodders/sourcemod","owner":{"login":"alliedmodders","id":6601917,"avatar_url":"https://avatars.githubusercontent.com/u/6601917?v=3","gravatar_id":"","url":"https://api.github.com/users/alliedmodders","html_url":"https://github.com/alliedmodders","followers_url":"https://api.github.com/users/alliedmodders/followers","following_url":"https://api.github.com/users/alliedmodders/following{/other_user}","gists_url":"https://api.github.com/users/alliedmodders/gists{/gist_id}","starred_url":"https://api.github.com/users/alliedmodders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alliedmodders/subscriptions","organizations_url":"https://api.github.com/users/alliedmodders/orgs","repos_url":"https://api.github.com/users/alliedmodders/repos","events_url":"https://api.github.com/users/alliedmodders/events{/privacy}","received_events_url":"https://api.github.com/users/alliedmodders/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alliedmodders/sourcemod","description":"SourceMod - Source Engine Scripting and Administration","fork":false,"url":"https://api.github.com/repos/alliedmodders/sourcemod","forks_url":"https://api.github.com/repos/alliedmodders/sourcemod/forks","keys_url":"https://api.github.com/repos/alliedmodders/sourcemod/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alliedmodders/sourcemod/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alliedmodders/sourcemod/teams","hooks_url":"https://api.github.com/repos/alliedmodders/sourcemod/hooks","issue_events_url":"https://api.github.com/repos/alliedmodders/sourcemod/issues/events{/number}","events_url":"https://api.github.com/repos/alliedmodders/sourcemod/events","assignees_url":"https://api.github.com/repos/alliedmodders/sourcemod/assignees{/user}","branches_url":"https://api.github.com/repos/alliedmodders/sourcemod/branches{/branch}","tags_url":"https://api.github.com/repos/alliedmodders/sourcemod/tags","blobs_url":"https://api.github.com/repos/alliedmodders/sourcemod/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alliedmodders/sourcemod/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alliedmodders/sourcemod/git/refs{/sha}","trees_url":"https://api.github.com/repos/alliedmodders/sourcemod/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alliedmodders/sourcemod/statuses/{sha}","languages_url":"https://api.github.com/repos/alliedmodders/sourcemod/languages","stargazers_url":"https://api.github.com/repos/alliedmodders/sourcemod/stargazers","contributors_url":"https://api.github.com/repos/alliedmodders/sourcemod/contributors","subscribers_url":"https://api.github.com/repos/alliedmodders/sourcemod/subscribers","subscription_url":"https://api.github.com/repos/alliedmodders/sourcemod/subscription","commits_url":"https://api.github.com/repos/alliedmodders/sourcemod/commits{/sha}","git_commits_url":"https://api.github.com/repos/alliedmodders/sourcemod/git/commits{/sha}","comments_url":"https://api.github.com/repos/alliedmodders/sourcemod/comments{/number}","issue_comment_url":"https://api.github.com/repos/alliedmodders/sourcemod/issues/comments{/number}","contents_url":"https://api.github.com/repos/alliedmodders/sourcemod/contents/{+path}","compare_url":"https://api.github.com/repos/alliedmodders/sourcemod/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alliedmodders/sourcemod/merges","archive_url":"https://api.github.com/repos/alliedmodders/sourcemod/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alliedmodders/sourcemod/downloads","issues_url":"https://api.github.com/repos/alliedmodders/sourcemod/issues{/number}","pulls_url":"https://api.github.com/repos/alliedmodders/sourcemod/pulls{/number}","milestones_url":"https://api.github.com/repos/alliedmodders/sourcemod/milestones{/number}","notifications_url":"https://api.github.com/repos/alliedmodders/sourcemod/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alliedmodders/sourcemod/labels{/name}","releases_url":"https://api.github.com/repos/alliedmodders/sourcemod/releases{/id}","deployments_url":"https://api.github.com/repos/alliedmodders/sourcemod/deployments","created_at":"2014-05-25T02:58:39Z","updated_at":"2016-07-15T13:36:20Z","pushed_at":"2016-07-20T23:54:32Z","git_url":"git://github.com/alliedmodders/sourcemod.git","ssh_url":"git@github.com:alliedmodders/sourcemod.git","clone_url":"https://github.com/alliedmodders/sourcemod.git","svn_url":"https://github.com/alliedmodders/sourcemod","homepage":"http://www.sourcemod.net/","size":39916,"stargazers_count":217,"watchers_count":217,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":110,"mirror_url":null,"open_issues_count":23,"forks":110,"open_issues":23,"watchers":217,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alliedmodders/sourcemod/pulls/529"},"html":{"href":"https://github.com/alliedmodders/sourcemod/pull/529"},"issue":{"href":"https://api.github.com/repos/alliedmodders/sourcemod/issues/529"},"comments":{"href":"https://api.github.com/repos/alliedmodders/sourcemod/issues/529/comments"},"review_comments":{"href":"https://api.github.com/repos/alliedmodders/sourcemod/pulls/529/comments"},"review_comment":{"href":"https://api.github.com/repos/alliedmodders/sourcemod/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alliedmodders/sourcemod/pulls/529/commits"},"statuses":{"href":"https://api.github.com/repos/alliedmodders/sourcemod/statuses/2c8614c639fe5f2d6cc5e74cac6562203eb6a663"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":3,"deletions":1,"changed_files":2}}
{"actor":{"display_login":"peace-maker"}}