{"action":"created","comment":{"url":"https://api.github.com/repos/otland/forgottenserver/pulls/comments/24311804","id":24311804,"diff_hunk":"@@ -47,6 +47,53 @@ void ProtocolLogin::disconnectClient(const std::string& message)\n \tgetConnection()->closeConnection();\n }\n \n+void ProtocolLogin::addWorldInfo(OutputMessage_ptr& output, bool isLiveCastLogin /*=false*/)\n+{\n+\t//Add MOTD\n+\toutput->AddByte(0x14);\n+\n+\tstd::ostringstream ss;\n+\tss << g_game.getMotdNum() << \"\\n\" << g_config.getString(ConfigManager::MOTD);\n+\toutput->AddString(ss.str());\n+\n+\t//Add char list\n+\toutput->AddByte(0x64);\n+\n+\toutput->AddByte(1); // number of worlds\n+\n+\toutput->AddByte(0); // world id\n+\toutput->AddString(g_config.getString(ConfigManager::SERVER_NAME));\n+\toutput->AddString(g_config.getString(ConfigManager::IP));\n+\n+\tif (isLiveCastLogin) {\n+\t\toutput->add<uint16_t>(g_config.getNumber(ConfigManager::LIVE_CAST_PORT));\n+\t} else {\n+\t\toutput->add<uint16_t>(g_config.getNumber(ConfigManager::GAME_PORT));","path":"src/protocollogin.cpp","position":25,"original_position":25,"commit_id":"989f70fca374e008a0a77e53cd881cec4bcc135d","original_commit_id":"989f70fca374e008a0a77e53cd881cec4bcc135d","user":{"login":"rowaraujo","id":9668277,"avatar_url":"https://avatars.githubusercontent.com/u/9668277?v=3","gravatar_id":"","url":"https://api.github.com/users/rowaraujo","html_url":"https://github.com/rowaraujo","followers_url":"https://api.github.com/users/rowaraujo/followers","following_url":"https://api.github.com/users/rowaraujo/following{/other_user}","gists_url":"https://api.github.com/users/rowaraujo/gists{/gist_id}","starred_url":"https://api.github.com/users/rowaraujo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rowaraujo/subscriptions","organizations_url":"https://api.github.com/users/rowaraujo/orgs","repos_url":"https://api.github.com/users/rowaraujo/repos","events_url":"https://api.github.com/users/rowaraujo/events{/privacy}","received_events_url":"https://api.github.com/users/rowaraujo/received_events","type":"User","site_admin":false},"body":"output->Add *","created_at":"2015-02-09T07:07:15Z","updated_at":"2015-02-09T07:07:15Z","html_url":"https://github.com/otland/forgottenserver/pull/994#discussion_r24311804","pull_request_url":"https://api.github.com/repos/otland/forgottenserver/pulls/994","_links":{"self":{"href":"https://api.github.com/repos/otland/forgottenserver/pulls/comments/24311804"},"html":{"href":"https://github.com/otland/forgottenserver/pull/994#discussion_r24311804"},"pull_request":{"href":"https://api.github.com/repos/otland/forgottenserver/pulls/994"}}},"pull_request":{"url":"https://api.github.com/repos/otland/forgottenserver/pulls/994","id":21555111,"html_url":"https://github.com/otland/forgottenserver/pull/994","diff_url":"https://github.com/otland/forgottenserver/pull/994.diff","patch_url":"https://github.com/otland/forgottenserver/pull/994.patch","issue_url":"https://api.github.com/repos/otland/forgottenserver/issues/994","number":994,"state":"open","locked":false,"title":"[WIP] Added a prototype version of a casting system","user":{"login":"djdamc","id":6125067,"avatar_url":"https://avatars.githubusercontent.com/u/6125067?v=3","gravatar_id":"","url":"https://api.github.com/users/djdamc","html_url":"https://github.com/djdamc","followers_url":"https://api.github.com/users/djdamc/followers","following_url":"https://api.github.com/users/djdamc/following{/other_user}","gists_url":"https://api.github.com/users/djdamc/gists{/gist_id}","starred_url":"https://api.github.com/users/djdamc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djdamc/subscriptions","organizations_url":"https://api.github.com/users/djdamc/orgs","repos_url":"https://api.github.com/users/djdamc/repos","events_url":"https://api.github.com/users/djdamc/events{/privacy}","received_events_url":"https://api.github.com/users/djdamc/received_events","type":"User","site_admin":false},"body":"Closes #984\r\nEdit: Chatroom feature has been added, however there are still some issues to work out.\r\n As for the internal details: broadcasting is done by the ASI/O thread when it calls the Connection::onWriteOperation(...) method. The dispatcher thread does only one additional copy (it is required, as the ASI/O thread receives the message object with it's content already encrypted) which is then used for broadcasting. All variables relevant to the casting system have been placed in the ProtocolGame class. Starting a cast is achieved by using the !cast [password] talkaction. Stopping it is done by using !stopcast. Joining a stream as a spectator is achieved by logging in with an empty account name and a password, assuming the caster set one. If something isn't clear, feel free to ask. I'm open to suggestions if you think there's something that could be improved (probably there is).\r\n\r\nP.S. don't merge yet ;)","created_at":"2014-09-22T01:11:45Z","updated_at":"2015-02-09T07:07:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e6c20147cd95f817455828d908c11f48ed00ef6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/otland/forgottenserver/pulls/994/commits","review_comments_url":"https://api.github.com/repos/otland/forgottenserver/pulls/994/comments","review_comment_url":"https://api.github.com/repos/otland/forgottenserver/pulls/comments/{number}","comments_url":"https://api.github.com/repos/otland/forgottenserver/issues/994/comments","statuses_url":"https://api.github.com/repos/otland/forgottenserver/statuses/989f70fca374e008a0a77e53cd881cec4bcc135d","head":{"label":"djdamc:casting_system","ref":"casting_system","sha":"989f70fca374e008a0a77e53cd881cec4bcc135d","user":{"login":"djdamc","id":6125067,"avatar_url":"https://avatars.githubusercontent.com/u/6125067?v=3","gravatar_id":"","url":"https://api.github.com/users/djdamc","html_url":"https://github.com/djdamc","followers_url":"https://api.github.com/users/djdamc/followers","following_url":"https://api.github.com/users/djdamc/following{/other_user}","gists_url":"https://api.github.com/users/djdamc/gists{/gist_id}","starred_url":"https://api.github.com/users/djdamc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djdamc/subscriptions","organizations_url":"https://api.github.com/users/djdamc/orgs","repos_url":"https://api.github.com/users/djdamc/repos","events_url":"https://api.github.com/users/djdamc/events{/privacy}","received_events_url":"https://api.github.com/users/djdamc/received_events","type":"User","site_admin":false},"repo":{"id":23932443,"name":"forgottenserver","full_name":"djdamc/forgottenserver","owner":{"login":"djdamc","id":6125067,"avatar_url":"https://avatars.githubusercontent.com/u/6125067?v=3","gravatar_id":"","url":"https://api.github.com/users/djdamc","html_url":"https://github.com/djdamc","followers_url":"https://api.github.com/users/djdamc/followers","following_url":"https://api.github.com/users/djdamc/following{/other_user}","gists_url":"https://api.github.com/users/djdamc/gists{/gist_id}","starred_url":"https://api.github.com/users/djdamc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djdamc/subscriptions","organizations_url":"https://api.github.com/users/djdamc/orgs","repos_url":"https://api.github.com/users/djdamc/repos","events_url":"https://api.github.com/users/djdamc/events{/privacy}","received_events_url":"https://api.github.com/users/djdamc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/djdamc/forgottenserver","description":"A free and open-source MMORPG server emulator written in C++","fork":true,"url":"https://api.github.com/repos/djdamc/forgottenserver","forks_url":"https://api.github.com/repos/djdamc/forgottenserver/forks","keys_url":"https://api.github.com/repos/djdamc/forgottenserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/djdamc/forgottenserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/djdamc/forgottenserver/teams","hooks_url":"https://api.github.com/repos/djdamc/forgottenserver/hooks","issue_events_url":"https://api.github.com/repos/djdamc/forgottenserver/issues/events{/number}","events_url":"https://api.github.com/repos/djdamc/forgottenserver/events","assignees_url":"https://api.github.com/repos/djdamc/forgottenserver/assignees{/user}","branches_url":"https://api.github.com/repos/djdamc/forgottenserver/branches{/branch}","tags_url":"https://api.github.com/repos/djdamc/forgottenserver/tags","blobs_url":"https://api.github.com/repos/djdamc/forgottenserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/djdamc/forgottenserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/djdamc/forgottenserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/djdamc/forgottenserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/djdamc/forgottenserver/statuses/{sha}","languages_url":"https://api.github.com/repos/djdamc/forgottenserver/languages","stargazers_url":"https://api.github.com/repos/djdamc/forgottenserver/stargazers","contributors_url":"https://api.github.com/repos/djdamc/forgottenserver/contributors","subscribers_url":"https://api.github.com/repos/djdamc/forgottenserver/subscribers","subscription_url":"https://api.github.com/repos/djdamc/forgottenserver/subscription","commits_url":"https://api.github.com/repos/djdamc/forgottenserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/djdamc/forgottenserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/djdamc/forgottenserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/djdamc/forgottenserver/issues/comments/{number}","contents_url":"https://api.github.com/repos/djdamc/forgottenserver/contents/{+path}","compare_url":"https://api.github.com/repos/djdamc/forgottenserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/djdamc/forgottenserver/merges","archive_url":"https://api.github.com/repos/djdamc/forgottenserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/djdamc/forgottenserver/downloads","issues_url":"https://api.github.com/repos/djdamc/forgottenserver/issues{/number}","pulls_url":"https://api.github.com/repos/djdamc/forgottenserver/pulls{/number}","milestones_url":"https://api.github.com/repos/djdamc/forgottenserver/milestones{/number}","notifications_url":"https://api.github.com/repos/djdamc/forgottenserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/djdamc/forgottenserver/labels{/name}","releases_url":"https://api.github.com/repos/djdamc/forgottenserver/releases{/id}","created_at":"2014-09-11T19:24:22Z","updated_at":"2015-01-02T22:01:06Z","pushed_at":"2015-01-03T12:29:49Z","git_url":"git://github.com/djdamc/forgottenserver.git","ssh_url":"git@github.com:djdamc/forgottenserver.git","clone_url":"https://github.com/djdamc/forgottenserver.git","svn_url":"https://github.com/djdamc/forgottenserver","homepage":"","size":11834,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"otland:master","ref":"master","sha":"a6226ebc51fe143b63b154718a98316c407eb499","user":{"login":"otland","id":4956302,"avatar_url":"https://avatars.githubusercontent.com/u/4956302?v=3","gravatar_id":"","url":"https://api.github.com/users/otland","html_url":"https://github.com/otland","followers_url":"https://api.github.com/users/otland/followers","following_url":"https://api.github.com/users/otland/following{/other_user}","gists_url":"https://api.github.com/users/otland/gists{/gist_id}","starred_url":"https://api.github.com/users/otland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otland/subscriptions","organizations_url":"https://api.github.com/users/otland/orgs","repos_url":"https://api.github.com/users/otland/repos","events_url":"https://api.github.com/users/otland/events{/privacy}","received_events_url":"https://api.github.com/users/otland/received_events","type":"Organization","site_admin":false},"repo":{"id":11081909,"name":"forgottenserver","full_name":"otland/forgottenserver","owner":{"login":"otland","id":4956302,"avatar_url":"https://avatars.githubusercontent.com/u/4956302?v=3","gravatar_id":"","url":"https://api.github.com/users/otland","html_url":"https://github.com/otland","followers_url":"https://api.github.com/users/otland/followers","following_url":"https://api.github.com/users/otland/following{/other_user}","gists_url":"https://api.github.com/users/otland/gists{/gist_id}","starred_url":"https://api.github.com/users/otland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otland/subscriptions","organizations_url":"https://api.github.com/users/otland/orgs","repos_url":"https://api.github.com/users/otland/repos","events_url":"https://api.github.com/users/otland/events{/privacy}","received_events_url":"https://api.github.com/users/otland/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/otland/forgottenserver","description":"A free and open-source MMORPG server emulator written in C++","fork":false,"url":"https://api.github.com/repos/otland/forgottenserver","forks_url":"https://api.github.com/repos/otland/forgottenserver/forks","keys_url":"https://api.github.com/repos/otland/forgottenserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/otland/forgottenserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/otland/forgottenserver/teams","hooks_url":"https://api.github.com/repos/otland/forgottenserver/hooks","issue_events_url":"https://api.github.com/repos/otland/forgottenserver/issues/events{/number}","events_url":"https://api.github.com/repos/otland/forgottenserver/events","assignees_url":"https://api.github.com/repos/otland/forgottenserver/assignees{/user}","branches_url":"https://api.github.com/repos/otland/forgottenserver/branches{/branch}","tags_url":"https://api.github.com/repos/otland/forgottenserver/tags","blobs_url":"https://api.github.com/repos/otland/forgottenserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/otland/forgottenserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/otland/forgottenserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/otland/forgottenserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/otland/forgottenserver/statuses/{sha}","languages_url":"https://api.github.com/repos/otland/forgottenserver/languages","stargazers_url":"https://api.github.com/repos/otland/forgottenserver/stargazers","contributors_url":"https://api.github.com/repos/otland/forgottenserver/contributors","subscribers_url":"https://api.github.com/repos/otland/forgottenserver/subscribers","subscription_url":"https://api.github.com/repos/otland/forgottenserver/subscription","commits_url":"https://api.github.com/repos/otland/forgottenserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/otland/forgottenserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/otland/forgottenserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/otland/forgottenserver/issues/comments/{number}","contents_url":"https://api.github.com/repos/otland/forgottenserver/contents/{+path}","compare_url":"https://api.github.com/repos/otland/forgottenserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/otland/forgottenserver/merges","archive_url":"https://api.github.com/repos/otland/forgottenserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/otland/forgottenserver/downloads","issues_url":"https://api.github.com/repos/otland/forgottenserver/issues{/number}","pulls_url":"https://api.github.com/repos/otland/forgottenserver/pulls{/number}","milestones_url":"https://api.github.com/repos/otland/forgottenserver/milestones{/number}","notifications_url":"https://api.github.com/repos/otland/forgottenserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/otland/forgottenserver/labels{/name}","releases_url":"https://api.github.com/repos/otland/forgottenserver/releases{/id}","created_at":"2013-07-01T01:57:06Z","updated_at":"2015-02-09T06:59:52Z","pushed_at":"2015-02-08T14:38:08Z","git_url":"git://github.com/otland/forgottenserver.git","ssh_url":"git@github.com:otland/forgottenserver.git","clone_url":"https://github.com/otland/forgottenserver.git","svn_url":"https://github.com/otland/forgottenserver","homepage":"","size":19125,"stargazers_count":205,"watchers_count":205,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":223,"mirror_url":null,"open_issues_count":62,"forks":223,"open_issues":62,"watchers":205,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/otland/forgottenserver/pulls/994"},"html":{"href":"https://github.com/otland/forgottenserver/pull/994"},"issue":{"href":"https://api.github.com/repos/otland/forgottenserver/issues/994"},"comments":{"href":"https://api.github.com/repos/otland/forgottenserver/issues/994/comments"},"review_comments":{"href":"https://api.github.com/repos/otland/forgottenserver/pulls/994/comments"},"review_comment":{"href":"https://api.github.com/repos/otland/forgottenserver/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/otland/forgottenserver/pulls/994/commits"},"statuses":{"href":"https://api.github.com/repos/otland/forgottenserver/statuses/989f70fca374e008a0a77e53cd881cec4bcc135d"}}}}