{"action":"created","comment":{"url":"https://api.github.com/repos/minetest/minetest/pulls/comments/29306887","id":29306887,"diff_hunk":"@@ -956,6 +999,73 @@ void Client::sendLegacyInit(const char* playerName, const char* playerPassword)\n \tSend(&pkt);\n }\n \n+void Client::sendInit(const std::string &playerName)\n+{\n+\tNetworkPacket pkt(TOSERVER_INIT, 1 + 2 + 2 + (1 + playerName.size()));\n+\n+\t// TODO (later) actually send supported compression modes\n+\tpkt << (u8) SER_FMT_VER_HIGHEST_READ << (u8) 42;\n+\tpkt << (u16) CLIENT_PROTOCOL_VERSION_MIN << (u16) CLIENT_PROTOCOL_VERSION_MAX;\n+\tpkt << playerName;\n+\n+\tSend(&pkt);\n+}\n+\n+void Client::startAuth(AuthMechanism chosen_auth_mechanism)\n+{\n+\tm_chosen_auth_mech = chosen_auth_mechanism;\n+\n+\tswitch (chosen_auth_mechanism) {\n+\t\tcase AUTH_MECHANISM_FIRST_SRP: {\n+\t\t\tm_authstate = 1;","path":"src/client.cpp","position":102,"original_position":102,"commit_id":"c3450990a0893ef5744f817b93812f43c9f7cdc5","original_commit_id":"c3450990a0893ef5744f817b93812f43c9f7cdc5","user":{"login":"Zeno-","id":5899883,"avatar_url":"https://avatars.githubusercontent.com/u/5899883?v=3","gravatar_id":"","url":"https://api.github.com/users/Zeno-","html_url":"https://github.com/Zeno-","followers_url":"https://api.github.com/users/Zeno-/followers","following_url":"https://api.github.com/users/Zeno-/following{/other_user}","gists_url":"https://api.github.com/users/Zeno-/gists{/gist_id}","starred_url":"https://api.github.com/users/Zeno-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zeno-/subscriptions","organizations_url":"https://api.github.com/users/Zeno-/orgs","repos_url":"https://api.github.com/users/Zeno-/repos","events_url":"https://api.github.com/users/Zeno-/events{/privacy}","received_events_url":"https://api.github.com/users/Zeno-/received_events","type":"User","site_admin":false},"body":"Personally I'd have each of these cases as a function","created_at":"2015-04-29T02:38:45Z","updated_at":"2015-04-29T02:38:45Z","html_url":"https://github.com/minetest/minetest/pull/2620#discussion_r29306887","pull_request_url":"https://api.github.com/repos/minetest/minetest/pulls/2620","_links":{"self":{"href":"https://api.github.com/repos/minetest/minetest/pulls/comments/29306887"},"html":{"href":"https://github.com/minetest/minetest/pull/2620#discussion_r29306887"},"pull_request":{"href":"https://api.github.com/repos/minetest/minetest/pulls/2620"}}},"pull_request":{"url":"https://api.github.com/repos/minetest/minetest/pulls/2620","id":33113488,"html_url":"https://github.com/minetest/minetest/pull/2620","diff_url":"https://github.com/minetest/minetest/pull/2620.diff","patch_url":"https://github.com/minetest/minetest/pull/2620.patch","issue_url":"https://api.github.com/repos/minetest/minetest/issues/2620","number":2620,"state":"open","locked":false,"title":"SRP based login","user":{"login":"est31","id":8872119,"avatar_url":"https://avatars.githubusercontent.com/u/8872119?v=3","gravatar_id":"","url":"https://api.github.com/users/est31","html_url":"https://github.com/est31","followers_url":"https://api.github.com/users/est31/followers","following_url":"https://api.github.com/users/est31/following{/other_user}","gists_url":"https://api.github.com/users/est31/gists{/gist_id}","starred_url":"https://api.github.com/users/est31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/est31/subscriptions","organizations_url":"https://api.github.com/users/est31/orgs","repos_url":"https://api.github.com/users/est31/repos","events_url":"https://api.github.com/users/est31/events{/privacy}","received_events_url":"https://api.github.com/users/est31/received_events","type":"User","site_admin":false},"body":"In order to fix #1943. Comments appreciated. What I have tested so far, and what works:\r\n* Logging in for first time\r\n* Logging in with srp\r\n* Logging in with srp based on the legacy hash\r\n* Changing the password\r\n\r\nAdds a bundled `mini-gmp` library to do bignum computations, with default option to use system provided gmp. If it isn't found, or discovery is disabled with `-DUSE_SYSTEM_GMP=0`, bundled lib is used.","created_at":"2015-04-12T02:14:04Z","updated_at":"2015-04-29T02:38:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d0018498c94e7ef12f8d85a951c05a902c4f526","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/minetest/minetest/pulls/2620/commits","review_comments_url":"https://api.github.com/repos/minetest/minetest/pulls/2620/comments","review_comment_url":"https://api.github.com/repos/minetest/minetest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/minetest/minetest/issues/2620/comments","statuses_url":"https://api.github.com/repos/minetest/minetest/statuses/c3450990a0893ef5744f817b93812f43c9f7cdc5","head":{"label":"est31:srplogin","ref":"srplogin","sha":"c3450990a0893ef5744f817b93812f43c9f7cdc5","user":{"login":"est31","id":8872119,"avatar_url":"https://avatars.githubusercontent.com/u/8872119?v=3","gravatar_id":"","url":"https://api.github.com/users/est31","html_url":"https://github.com/est31","followers_url":"https://api.github.com/users/est31/followers","following_url":"https://api.github.com/users/est31/following{/other_user}","gists_url":"https://api.github.com/users/est31/gists{/gist_id}","starred_url":"https://api.github.com/users/est31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/est31/subscriptions","organizations_url":"https://api.github.com/users/est31/orgs","repos_url":"https://api.github.com/users/est31/repos","events_url":"https://api.github.com/users/est31/events{/privacy}","received_events_url":"https://api.github.com/users/est31/received_events","type":"User","site_admin":false},"repo":{"id":28881630,"name":"minetest","full_name":"est31/minetest","owner":{"login":"est31","id":8872119,"avatar_url":"https://avatars.githubusercontent.com/u/8872119?v=3","gravatar_id":"","url":"https://api.github.com/users/est31","html_url":"https://github.com/est31","followers_url":"https://api.github.com/users/est31/followers","following_url":"https://api.github.com/users/est31/following{/other_user}","gists_url":"https://api.github.com/users/est31/gists{/gist_id}","starred_url":"https://api.github.com/users/est31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/est31/subscriptions","organizations_url":"https://api.github.com/users/est31/orgs","repos_url":"https://api.github.com/users/est31/repos","events_url":"https://api.github.com/users/est31/events{/privacy}","received_events_url":"https://api.github.com/users/est31/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/est31/minetest","description":"Minetest, an open source infinite-world block sandbox game with survival and crafting. [also [minetest_game](https://github.com/minetest/minetest_game)]","fork":true,"url":"https://api.github.com/repos/est31/minetest","forks_url":"https://api.github.com/repos/est31/minetest/forks","keys_url":"https://api.github.com/repos/est31/minetest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/est31/minetest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/est31/minetest/teams","hooks_url":"https://api.github.com/repos/est31/minetest/hooks","issue_events_url":"https://api.github.com/repos/est31/minetest/issues/events{/number}","events_url":"https://api.github.com/repos/est31/minetest/events","assignees_url":"https://api.github.com/repos/est31/minetest/assignees{/user}","branches_url":"https://api.github.com/repos/est31/minetest/branches{/branch}","tags_url":"https://api.github.com/repos/est31/minetest/tags","blobs_url":"https://api.github.com/repos/est31/minetest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/est31/minetest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/est31/minetest/git/refs{/sha}","trees_url":"https://api.github.com/repos/est31/minetest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/est31/minetest/statuses/{sha}","languages_url":"https://api.github.com/repos/est31/minetest/languages","stargazers_url":"https://api.github.com/repos/est31/minetest/stargazers","contributors_url":"https://api.github.com/repos/est31/minetest/contributors","subscribers_url":"https://api.github.com/repos/est31/minetest/subscribers","subscription_url":"https://api.github.com/repos/est31/minetest/subscription","commits_url":"https://api.github.com/repos/est31/minetest/commits{/sha}","git_commits_url":"https://api.github.com/repos/est31/minetest/git/commits{/sha}","comments_url":"https://api.github.com/repos/est31/minetest/comments{/number}","issue_comment_url":"https://api.github.com/repos/est31/minetest/issues/comments{/number}","contents_url":"https://api.github.com/repos/est31/minetest/contents/{+path}","compare_url":"https://api.github.com/repos/est31/minetest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/est31/minetest/merges","archive_url":"https://api.github.com/repos/est31/minetest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/est31/minetest/downloads","issues_url":"https://api.github.com/repos/est31/minetest/issues{/number}","pulls_url":"https://api.github.com/repos/est31/minetest/pulls{/number}","milestones_url":"https://api.github.com/repos/est31/minetest/milestones{/number}","notifications_url":"https://api.github.com/repos/est31/minetest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/est31/minetest/labels{/name}","releases_url":"https://api.github.com/repos/est31/minetest/releases{/id}","created_at":"2015-01-06T20:18:47Z","updated_at":"2015-04-24T18:26:16Z","pushed_at":"2015-04-26T19:55:23Z","git_url":"git://github.com/est31/minetest.git","ssh_url":"git@github.com:est31/minetest.git","clone_url":"https://github.com/est31/minetest.git","svn_url":"https://github.com/est31/minetest","homepage":"http://minetest.net/","size":34549,"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":"minetest:master","ref":"master","sha":"732eb72a0c4e2fb4632b0f42762d102e0d98dffa","user":{"login":"minetest","id":2624745,"avatar_url":"https://avatars.githubusercontent.com/u/2624745?v=3","gravatar_id":"","url":"https://api.github.com/users/minetest","html_url":"https://github.com/minetest","followers_url":"https://api.github.com/users/minetest/followers","following_url":"https://api.github.com/users/minetest/following{/other_user}","gists_url":"https://api.github.com/users/minetest/gists{/gist_id}","starred_url":"https://api.github.com/users/minetest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minetest/subscriptions","organizations_url":"https://api.github.com/users/minetest/orgs","repos_url":"https://api.github.com/users/minetest/repos","events_url":"https://api.github.com/users/minetest/events{/privacy}","received_events_url":"https://api.github.com/users/minetest/received_events","type":"Organization","site_admin":false},"repo":{"id":2168780,"name":"minetest","full_name":"minetest/minetest","owner":{"login":"minetest","id":2624745,"avatar_url":"https://avatars.githubusercontent.com/u/2624745?v=3","gravatar_id":"","url":"https://api.github.com/users/minetest","html_url":"https://github.com/minetest","followers_url":"https://api.github.com/users/minetest/followers","following_url":"https://api.github.com/users/minetest/following{/other_user}","gists_url":"https://api.github.com/users/minetest/gists{/gist_id}","starred_url":"https://api.github.com/users/minetest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minetest/subscriptions","organizations_url":"https://api.github.com/users/minetest/orgs","repos_url":"https://api.github.com/users/minetest/repos","events_url":"https://api.github.com/users/minetest/events{/privacy}","received_events_url":"https://api.github.com/users/minetest/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/minetest/minetest","description":"Minetest, an open source infinite-world block sandbox game with survival and crafting. [also https://github.com/minetest/minetest_game]","fork":false,"url":"https://api.github.com/repos/minetest/minetest","forks_url":"https://api.github.com/repos/minetest/minetest/forks","keys_url":"https://api.github.com/repos/minetest/minetest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/minetest/minetest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/minetest/minetest/teams","hooks_url":"https://api.github.com/repos/minetest/minetest/hooks","issue_events_url":"https://api.github.com/repos/minetest/minetest/issues/events{/number}","events_url":"https://api.github.com/repos/minetest/minetest/events","assignees_url":"https://api.github.com/repos/minetest/minetest/assignees{/user}","branches_url":"https://api.github.com/repos/minetest/minetest/branches{/branch}","tags_url":"https://api.github.com/repos/minetest/minetest/tags","blobs_url":"https://api.github.com/repos/minetest/minetest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/minetest/minetest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/minetest/minetest/git/refs{/sha}","trees_url":"https://api.github.com/repos/minetest/minetest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/minetest/minetest/statuses/{sha}","languages_url":"https://api.github.com/repos/minetest/minetest/languages","stargazers_url":"https://api.github.com/repos/minetest/minetest/stargazers","contributors_url":"https://api.github.com/repos/minetest/minetest/contributors","subscribers_url":"https://api.github.com/repos/minetest/minetest/subscribers","subscription_url":"https://api.github.com/repos/minetest/minetest/subscription","commits_url":"https://api.github.com/repos/minetest/minetest/commits{/sha}","git_commits_url":"https://api.github.com/repos/minetest/minetest/git/commits{/sha}","comments_url":"https://api.github.com/repos/minetest/minetest/comments{/number}","issue_comment_url":"https://api.github.com/repos/minetest/minetest/issues/comments{/number}","contents_url":"https://api.github.com/repos/minetest/minetest/contents/{+path}","compare_url":"https://api.github.com/repos/minetest/minetest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/minetest/minetest/merges","archive_url":"https://api.github.com/repos/minetest/minetest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/minetest/minetest/downloads","issues_url":"https://api.github.com/repos/minetest/minetest/issues{/number}","pulls_url":"https://api.github.com/repos/minetest/minetest/pulls{/number}","milestones_url":"https://api.github.com/repos/minetest/minetest/milestones{/number}","notifications_url":"https://api.github.com/repos/minetest/minetest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/minetest/minetest/labels{/name}","releases_url":"https://api.github.com/repos/minetest/minetest/releases{/id}","created_at":"2011-08-07T13:48:36Z","updated_at":"2015-04-28T12:32:45Z","pushed_at":"2015-04-27T16:15:31Z","git_url":"git://github.com/minetest/minetest.git","ssh_url":"git@github.com:minetest/minetest.git","clone_url":"https://github.com/minetest/minetest.git","svn_url":"https://github.com/minetest/minetest","homepage":"http://minetest.net/","size":88579,"stargazers_count":1461,"watchers_count":1461,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":481,"mirror_url":null,"open_issues_count":491,"forks":481,"open_issues":491,"watchers":1461,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/minetest/minetest/pulls/2620"},"html":{"href":"https://github.com/minetest/minetest/pull/2620"},"issue":{"href":"https://api.github.com/repos/minetest/minetest/issues/2620"},"comments":{"href":"https://api.github.com/repos/minetest/minetest/issues/2620/comments"},"review_comments":{"href":"https://api.github.com/repos/minetest/minetest/pulls/2620/comments"},"review_comment":{"href":"https://api.github.com/repos/minetest/minetest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/minetest/minetest/pulls/2620/commits"},"statuses":{"href":"https://api.github.com/repos/minetest/minetest/statuses/c3450990a0893ef5744f817b93812f43c9f7cdc5"}}}}