{"action":"created","comment":{"url":"https://api.github.com/repos/cuberite/cuberite/pulls/comments/35366090","id":35366090,"diff_hunk":"@@ -0,0 +1,54 @@\n+#pragma once\n+\n+#include <unordered_map>\n+#include <set>\n+\n+#include \"StringUtils.h\"\n+\n+#include \"Bindings/PluginLua.h\"\n+\n+\n+class cClientHandle;\n+class cCriticalSection;\n+\n+class cChannelCallback : public cPluginLua::cResettable\n+{\n+\tint m_FnRef;\n+public:\n+\tcChannelCallback(cPluginLua & a_Plugin, int a_FnRef) : cPluginLua::cResettable(a_Plugin), m_FnRef(a_FnRef){}\n+\tvoid Call(const cClientHandle & a_Handle, const AString & a_Data);\n+\tbool BelongsTo(const cPluginLua * a_Plugin);\n+};\n+\n+\n+// tolua_begin\n+class cChannelManager\n+{\n+\n+public:\n+\ttypedef SharedPtr<cChannelCallback> cChannelCallbackRef;\n+\ttypedef std::unordered_map<AString, cChannelCallbackRef> CallbackMap;\n+\n+\tvoid AddPlayerToChannel      (cClientHandle & a_Client, const AString & a_Channel);\n+\tvoid AddPlayerToChannels     (cClientHandle & a_Client, const AString & a_Channels);\n+\tvoid RemovePlayerFromChannel (cClientHandle & a_Client, const AString & a_Channel);\n+\tvoid RemovePlayerFromChannels(cClientHandle & a_Client, const AString & a_Channels);\n+\tbool PlayerHasChannel        (cClientHandle & a_Client, const AString & a_Channel);","path":"src/ChannelManager.h","position":36,"original_position":36,"commit_id":"41153995c8b6d1f54bd6c96e457c47e206de7461","original_commit_id":"41153995c8b6d1f54bd6c96e457c47e206de7461","user":{"login":"madmaxoft","id":4388386,"avatar_url":"https://avatars.githubusercontent.com/u/4388386?v=3","gravatar_id":"","url":"https://api.github.com/users/madmaxoft","html_url":"https://github.com/madmaxoft","followers_url":"https://api.github.com/users/madmaxoft/followers","following_url":"https://api.github.com/users/madmaxoft/following{/other_user}","gists_url":"https://api.github.com/users/madmaxoft/gists{/gist_id}","starred_url":"https://api.github.com/users/madmaxoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madmaxoft/subscriptions","organizations_url":"https://api.github.com/users/madmaxoft/orgs","repos_url":"https://api.github.com/users/madmaxoft/repos","events_url":"https://api.github.com/users/madmaxoft/events{/privacy}","received_events_url":"https://api.github.com/users/madmaxoft/received_events","type":"User","site_admin":false},"body":"Player != Client. Rename the functions.","created_at":"2015-07-23T20:16:02Z","updated_at":"2015-07-23T20:16:02Z","html_url":"https://github.com/cuberite/cuberite/pull/2384#discussion_r35366090","pull_request_url":"https://api.github.com/repos/cuberite/cuberite/pulls/2384","_links":{"self":{"href":"https://api.github.com/repos/cuberite/cuberite/pulls/comments/35366090"},"html":{"href":"https://github.com/cuberite/cuberite/pull/2384#discussion_r35366090"},"pull_request":{"href":"https://api.github.com/repos/cuberite/cuberite/pulls/2384"}}},"pull_request":{"url":"https://api.github.com/repos/cuberite/cuberite/pulls/2384","id":40708913,"html_url":"https://github.com/cuberite/cuberite/pull/2384","diff_url":"https://github.com/cuberite/cuberite/pull/2384.diff","patch_url":"https://github.com/cuberite/cuberite/pull/2384.patch","issue_url":"https://api.github.com/repos/cuberite/cuberite/issues/2384","number":2384,"state":"open","locked":false,"title":"Channel Management","user":{"login":"SamJBarney","id":1827860,"avatar_url":"https://avatars.githubusercontent.com/u/1827860?v=3","gravatar_id":"","url":"https://api.github.com/users/SamJBarney","html_url":"https://github.com/SamJBarney","followers_url":"https://api.github.com/users/SamJBarney/followers","following_url":"https://api.github.com/users/SamJBarney/following{/other_user}","gists_url":"https://api.github.com/users/SamJBarney/gists{/gist_id}","starred_url":"https://api.github.com/users/SamJBarney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamJBarney/subscriptions","organizations_url":"https://api.github.com/users/SamJBarney/orgs","repos_url":"https://api.github.com/users/SamJBarney/repos","events_url":"https://api.github.com/users/SamJBarney/events{/privacy}","received_events_url":"https://api.github.com/users/SamJBarney/received_events","type":"User","site_admin":false},"body":"* Allows plugins to claim a plugin channel and assign a callback, making it the only one that is called.\r\n* If no plugin owns a channel, then it goes through the hook system like normal.\r\n* Plugins can assign a client handle to a channel.\r\n* Plugins can remove a client handle from a channel.","created_at":"2015-07-23T19:30:32Z","updated_at":"2015-07-23T20:16:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9cda365c810b77d10417ea9a3cfc7ab58cc6556d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cuberite/cuberite/pulls/2384/commits","review_comments_url":"https://api.github.com/repos/cuberite/cuberite/pulls/2384/comments","review_comment_url":"https://api.github.com/repos/cuberite/cuberite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cuberite/cuberite/issues/2384/comments","statuses_url":"https://api.github.com/repos/cuberite/cuberite/statuses/41153995c8b6d1f54bd6c96e457c47e206de7461","head":{"label":"SamJBarney:ChannelManagement","ref":"ChannelManagement","sha":"41153995c8b6d1f54bd6c96e457c47e206de7461","user":{"login":"SamJBarney","id":1827860,"avatar_url":"https://avatars.githubusercontent.com/u/1827860?v=3","gravatar_id":"","url":"https://api.github.com/users/SamJBarney","html_url":"https://github.com/SamJBarney","followers_url":"https://api.github.com/users/SamJBarney/followers","following_url":"https://api.github.com/users/SamJBarney/following{/other_user}","gists_url":"https://api.github.com/users/SamJBarney/gists{/gist_id}","starred_url":"https://api.github.com/users/SamJBarney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamJBarney/subscriptions","organizations_url":"https://api.github.com/users/SamJBarney/orgs","repos_url":"https://api.github.com/users/SamJBarney/repos","events_url":"https://api.github.com/users/SamJBarney/events{/privacy}","received_events_url":"https://api.github.com/users/SamJBarney/received_events","type":"User","site_admin":false},"repo":{"id":38647641,"name":"cuberite","full_name":"SamJBarney/cuberite","owner":{"login":"SamJBarney","id":1827860,"avatar_url":"https://avatars.githubusercontent.com/u/1827860?v=3","gravatar_id":"","url":"https://api.github.com/users/SamJBarney","html_url":"https://github.com/SamJBarney","followers_url":"https://api.github.com/users/SamJBarney/followers","following_url":"https://api.github.com/users/SamJBarney/following{/other_user}","gists_url":"https://api.github.com/users/SamJBarney/gists{/gist_id}","starred_url":"https://api.github.com/users/SamJBarney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamJBarney/subscriptions","organizations_url":"https://api.github.com/users/SamJBarney/orgs","repos_url":"https://api.github.com/users/SamJBarney/repos","events_url":"https://api.github.com/users/SamJBarney/events{/privacy}","received_events_url":"https://api.github.com/users/SamJBarney/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SamJBarney/cuberite","description":"A performant C++ Minecraft compatible game server","fork":true,"url":"https://api.github.com/repos/SamJBarney/cuberite","forks_url":"https://api.github.com/repos/SamJBarney/cuberite/forks","keys_url":"https://api.github.com/repos/SamJBarney/cuberite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SamJBarney/cuberite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SamJBarney/cuberite/teams","hooks_url":"https://api.github.com/repos/SamJBarney/cuberite/hooks","issue_events_url":"https://api.github.com/repos/SamJBarney/cuberite/issues/events{/number}","events_url":"https://api.github.com/repos/SamJBarney/cuberite/events","assignees_url":"https://api.github.com/repos/SamJBarney/cuberite/assignees{/user}","branches_url":"https://api.github.com/repos/SamJBarney/cuberite/branches{/branch}","tags_url":"https://api.github.com/repos/SamJBarney/cuberite/tags","blobs_url":"https://api.github.com/repos/SamJBarney/cuberite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SamJBarney/cuberite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SamJBarney/cuberite/git/refs{/sha}","trees_url":"https://api.github.com/repos/SamJBarney/cuberite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SamJBarney/cuberite/statuses/{sha}","languages_url":"https://api.github.com/repos/SamJBarney/cuberite/languages","stargazers_url":"https://api.github.com/repos/SamJBarney/cuberite/stargazers","contributors_url":"https://api.github.com/repos/SamJBarney/cuberite/contributors","subscribers_url":"https://api.github.com/repos/SamJBarney/cuberite/subscribers","subscription_url":"https://api.github.com/repos/SamJBarney/cuberite/subscription","commits_url":"https://api.github.com/repos/SamJBarney/cuberite/commits{/sha}","git_commits_url":"https://api.github.com/repos/SamJBarney/cuberite/git/commits{/sha}","comments_url":"https://api.github.com/repos/SamJBarney/cuberite/comments{/number}","issue_comment_url":"https://api.github.com/repos/SamJBarney/cuberite/issues/comments{/number}","contents_url":"https://api.github.com/repos/SamJBarney/cuberite/contents/{+path}","compare_url":"https://api.github.com/repos/SamJBarney/cuberite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SamJBarney/cuberite/merges","archive_url":"https://api.github.com/repos/SamJBarney/cuberite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SamJBarney/cuberite/downloads","issues_url":"https://api.github.com/repos/SamJBarney/cuberite/issues{/number}","pulls_url":"https://api.github.com/repos/SamJBarney/cuberite/pulls{/number}","milestones_url":"https://api.github.com/repos/SamJBarney/cuberite/milestones{/number}","notifications_url":"https://api.github.com/repos/SamJBarney/cuberite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SamJBarney/cuberite/labels{/name}","releases_url":"https://api.github.com/repos/SamJBarney/cuberite/releases{/id}","created_at":"2015-07-06T21:35:23Z","updated_at":"2015-07-06T21:35:28Z","pushed_at":"2015-07-23T19:36:31Z","git_url":"git://github.com/SamJBarney/cuberite.git","ssh_url":"git@github.com:SamJBarney/cuberite.git","clone_url":"https://github.com/SamJBarney/cuberite.git","svn_url":"https://github.com/SamJBarney/cuberite","homepage":"http://cuberite.org","size":77396,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cuberite:master","ref":"master","sha":"7cb981443e3709268d32fa2ea286f37708f07d82","user":{"login":"cuberite","id":8973961,"avatar_url":"https://avatars.githubusercontent.com/u/8973961?v=3","gravatar_id":"","url":"https://api.github.com/users/cuberite","html_url":"https://github.com/cuberite","followers_url":"https://api.github.com/users/cuberite/followers","following_url":"https://api.github.com/users/cuberite/following{/other_user}","gists_url":"https://api.github.com/users/cuberite/gists{/gist_id}","starred_url":"https://api.github.com/users/cuberite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuberite/subscriptions","organizations_url":"https://api.github.com/users/cuberite/orgs","repos_url":"https://api.github.com/users/cuberite/repos","events_url":"https://api.github.com/users/cuberite/events{/privacy}","received_events_url":"https://api.github.com/users/cuberite/received_events","type":"Organization","site_admin":false},"repo":{"id":11693709,"name":"cuberite","full_name":"cuberite/cuberite","owner":{"login":"cuberite","id":8973961,"avatar_url":"https://avatars.githubusercontent.com/u/8973961?v=3","gravatar_id":"","url":"https://api.github.com/users/cuberite","html_url":"https://github.com/cuberite","followers_url":"https://api.github.com/users/cuberite/followers","following_url":"https://api.github.com/users/cuberite/following{/other_user}","gists_url":"https://api.github.com/users/cuberite/gists{/gist_id}","starred_url":"https://api.github.com/users/cuberite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuberite/subscriptions","organizations_url":"https://api.github.com/users/cuberite/orgs","repos_url":"https://api.github.com/users/cuberite/repos","events_url":"https://api.github.com/users/cuberite/events{/privacy}","received_events_url":"https://api.github.com/users/cuberite/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cuberite/cuberite","description":"A performant C++ Minecraft compatible game server","fork":false,"url":"https://api.github.com/repos/cuberite/cuberite","forks_url":"https://api.github.com/repos/cuberite/cuberite/forks","keys_url":"https://api.github.com/repos/cuberite/cuberite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cuberite/cuberite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cuberite/cuberite/teams","hooks_url":"https://api.github.com/repos/cuberite/cuberite/hooks","issue_events_url":"https://api.github.com/repos/cuberite/cuberite/issues/events{/number}","events_url":"https://api.github.com/repos/cuberite/cuberite/events","assignees_url":"https://api.github.com/repos/cuberite/cuberite/assignees{/user}","branches_url":"https://api.github.com/repos/cuberite/cuberite/branches{/branch}","tags_url":"https://api.github.com/repos/cuberite/cuberite/tags","blobs_url":"https://api.github.com/repos/cuberite/cuberite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cuberite/cuberite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cuberite/cuberite/git/refs{/sha}","trees_url":"https://api.github.com/repos/cuberite/cuberite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cuberite/cuberite/statuses/{sha}","languages_url":"https://api.github.com/repos/cuberite/cuberite/languages","stargazers_url":"https://api.github.com/repos/cuberite/cuberite/stargazers","contributors_url":"https://api.github.com/repos/cuberite/cuberite/contributors","subscribers_url":"https://api.github.com/repos/cuberite/cuberite/subscribers","subscription_url":"https://api.github.com/repos/cuberite/cuberite/subscription","commits_url":"https://api.github.com/repos/cuberite/cuberite/commits{/sha}","git_commits_url":"https://api.github.com/repos/cuberite/cuberite/git/commits{/sha}","comments_url":"https://api.github.com/repos/cuberite/cuberite/comments{/number}","issue_comment_url":"https://api.github.com/repos/cuberite/cuberite/issues/comments{/number}","contents_url":"https://api.github.com/repos/cuberite/cuberite/contents/{+path}","compare_url":"https://api.github.com/repos/cuberite/cuberite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cuberite/cuberite/merges","archive_url":"https://api.github.com/repos/cuberite/cuberite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cuberite/cuberite/downloads","issues_url":"https://api.github.com/repos/cuberite/cuberite/issues{/number}","pulls_url":"https://api.github.com/repos/cuberite/cuberite/pulls{/number}","milestones_url":"https://api.github.com/repos/cuberite/cuberite/milestones{/number}","notifications_url":"https://api.github.com/repos/cuberite/cuberite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cuberite/cuberite/labels{/name}","releases_url":"https://api.github.com/repos/cuberite/cuberite/releases{/id}","created_at":"2013-07-26T19:56:59Z","updated_at":"2015-07-23T16:47:35Z","pushed_at":"2015-07-23T19:36:33Z","git_url":"git://github.com/cuberite/cuberite.git","ssh_url":"git@github.com:cuberite/cuberite.git","clone_url":"https://github.com/cuberite/cuberite.git","svn_url":"https://github.com/cuberite/cuberite","homepage":"http://cuberite.org","size":166255,"stargazers_count":703,"watchers_count":703,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":214,"mirror_url":null,"open_issues_count":365,"forks":214,"open_issues":365,"watchers":703,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cuberite/cuberite/pulls/2384"},"html":{"href":"https://github.com/cuberite/cuberite/pull/2384"},"issue":{"href":"https://api.github.com/repos/cuberite/cuberite/issues/2384"},"comments":{"href":"https://api.github.com/repos/cuberite/cuberite/issues/2384/comments"},"review_comments":{"href":"https://api.github.com/repos/cuberite/cuberite/pulls/2384/comments"},"review_comment":{"href":"https://api.github.com/repos/cuberite/cuberite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cuberite/cuberite/pulls/2384/commits"},"statuses":{"href":"https://api.github.com/repos/cuberite/cuberite/statuses/41153995c8b6d1f54bd6c96e457c47e206de7461"}}}}