{"action":"created","comment":{"url":"https://api.github.com/repos/thelounge/lounge/pulls/comments/84830335","pull_request_review_id":5582052,"id":84830335,"diff_hunk":"@@ -0,0 +1,33 @@\n+\"use strict\";\n+\n+var Chan = require(\"../../models/chan\");\n+var _ = require(\"lodash\");\n+\n+exports.commands = [\"join\"];\n+\n+exports.input = function(network, chan, cmd, args) {\n+\tvar client = this;\n+\tif (args.length !== 0) {\n+\t\tvar irc = network.irc;\n+\t\tirc.join(args[0], args[1]);\n+\t}\n+\n+\t_.zip(args[0].split(/,/g), args[1].split(/,/g))\n+\t\t.map(function(chanPairs) {\n+\t\t\treturn new Chan({\n+\t\t\t\ttype: Chan.Type.CHANNEL,\n+\t\t\t\tname: chanPairs[0],\n+\t\t\t\tkey: chanPairs[1],\n+\t\t\t});\n+\t\t})\n+\t\t.map(function(channel) {\n+\t\t\tnetwork.channels.push(channel);\n+\t\t\tclient.emit(\"join\", {\n+\t\t\t\tnetwork: network.id,\n+\t\t\t\tchan: channel\n+\t\t\t});\n+\t\t});\n+\n+\tthis.save();","path":"src/plugins/inputs/join.js","position":31,"original_position":31,"commit_id":"799bef9bec060de1cd298fb9f14bc2c4f453a415","original_commit_id":"799bef9bec060de1cd298fb9f14bc2c4f453a415","user":{"login":"astorije","id":113730,"avatar_url":"https://avatars.githubusercontent.com/u/113730?v=3","gravatar_id":"","url":"https://api.github.com/users/astorije","html_url":"https://github.com/astorije","followers_url":"https://api.github.com/users/astorije/followers","following_url":"https://api.github.com/users/astorije/following{/other_user}","gists_url":"https://api.github.com/users/astorije/gists{/gist_id}","starred_url":"https://api.github.com/users/astorije/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astorije/subscriptions","organizations_url":"https://api.github.com/users/astorije/orgs","repos_url":"https://api.github.com/users/astorije/repos","events_url":"https://api.github.com/users/astorije/events{/privacy}","received_events_url":"https://api.github.com/users/astorije/received_events","type":"User","site_admin":false},"body":"I might be lacking something, but I don't see why we would need to save the config file or create the client-side channel twice. When server acknowledges the joining should be enough.\r\nUnless there are server that don't acknowledge you joined a server properly, but that would be madness... wouldn't it?","created_at":"2016-10-25T04:47:41Z","updated_at":"2016-10-25T04:47:41Z","html_url":"https://github.com/thelounge/lounge/pull/715#discussion_r84830335","pull_request_url":"https://api.github.com/repos/thelounge/lounge/pulls/715","_links":{"self":{"href":"https://api.github.com/repos/thelounge/lounge/pulls/comments/84830335"},"html":{"href":"https://github.com/thelounge/lounge/pull/715#discussion_r84830335"},"pull_request":{"href":"https://api.github.com/repos/thelounge/lounge/pulls/715"}}},"pull_request":{"url":"https://api.github.com/repos/thelounge/lounge/pulls/715","id":90498037,"html_url":"https://github.com/thelounge/lounge/pull/715","diff_url":"https://github.com/thelounge/lounge/pull/715.diff","patch_url":"https://github.com/thelounge/lounge/pull/715.patch","issue_url":"https://api.github.com/repos/thelounge/lounge/issues/715","number":715,"state":"open","locked":false,"title":"Store channel keys","user":{"login":"spookhurb","id":19539967,"avatar_url":"https://avatars.githubusercontent.com/u/19539967?v=3","gravatar_id":"","url":"https://api.github.com/users/spookhurb","html_url":"https://github.com/spookhurb","followers_url":"https://api.github.com/users/spookhurb/followers","following_url":"https://api.github.com/users/spookhurb/following{/other_user}","gists_url":"https://api.github.com/users/spookhurb/gists{/gist_id}","starred_url":"https://api.github.com/users/spookhurb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spookhurb/subscriptions","organizations_url":"https://api.github.com/users/spookhurb/orgs","repos_url":"https://api.github.com/users/spookhurb/repos","events_url":"https://api.github.com/users/spookhurb/events{/privacy}","received_events_url":"https://api.github.com/users/spookhurb/received_events","type":"User","site_admin":false},"body":"Fixes issue #412 \r\n\r\nThis stores channel keys in the user's config file. It can grab them from /join commands or if they are entered in the connect window (in the format #channel $key). It also sends the keys to server when reconnecting.","created_at":"2016-10-22T22:40:54Z","updated_at":"2016-10-25T04:47:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"46b33f52ba333e4ad043394426762f16aa1ac892","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/thelounge/lounge/pulls/715/commits","review_comments_url":"https://api.github.com/repos/thelounge/lounge/pulls/715/comments","review_comment_url":"https://api.github.com/repos/thelounge/lounge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thelounge/lounge/issues/715/comments","statuses_url":"https://api.github.com/repos/thelounge/lounge/statuses/799bef9bec060de1cd298fb9f14bc2c4f453a415","head":{"label":"spookhurb:store-chankeys","ref":"store-chankeys","sha":"799bef9bec060de1cd298fb9f14bc2c4f453a415","user":{"login":"spookhurb","id":19539967,"avatar_url":"https://avatars.githubusercontent.com/u/19539967?v=3","gravatar_id":"","url":"https://api.github.com/users/spookhurb","html_url":"https://github.com/spookhurb","followers_url":"https://api.github.com/users/spookhurb/followers","following_url":"https://api.github.com/users/spookhurb/following{/other_user}","gists_url":"https://api.github.com/users/spookhurb/gists{/gist_id}","starred_url":"https://api.github.com/users/spookhurb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spookhurb/subscriptions","organizations_url":"https://api.github.com/users/spookhurb/orgs","repos_url":"https://api.github.com/users/spookhurb/repos","events_url":"https://api.github.com/users/spookhurb/events{/privacy}","received_events_url":"https://api.github.com/users/spookhurb/received_events","type":"User","site_admin":false},"repo":{"id":71667858,"name":"lounge","full_name":"spookhurb/lounge","owner":{"login":"spookhurb","id":19539967,"avatar_url":"https://avatars.githubusercontent.com/u/19539967?v=3","gravatar_id":"","url":"https://api.github.com/users/spookhurb","html_url":"https://github.com/spookhurb","followers_url":"https://api.github.com/users/spookhurb/followers","following_url":"https://api.github.com/users/spookhurb/following{/other_user}","gists_url":"https://api.github.com/users/spookhurb/gists{/gist_id}","starred_url":"https://api.github.com/users/spookhurb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spookhurb/subscriptions","organizations_url":"https://api.github.com/users/spookhurb/orgs","repos_url":"https://api.github.com/users/spookhurb/repos","events_url":"https://api.github.com/users/spookhurb/events{/privacy}","received_events_url":"https://api.github.com/users/spookhurb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/spookhurb/lounge","description":"The Lounge — Self-hosted web IRC client","fork":true,"url":"https://api.github.com/repos/spookhurb/lounge","forks_url":"https://api.github.com/repos/spookhurb/lounge/forks","keys_url":"https://api.github.com/repos/spookhurb/lounge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spookhurb/lounge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spookhurb/lounge/teams","hooks_url":"https://api.github.com/repos/spookhurb/lounge/hooks","issue_events_url":"https://api.github.com/repos/spookhurb/lounge/issues/events{/number}","events_url":"https://api.github.com/repos/spookhurb/lounge/events","assignees_url":"https://api.github.com/repos/spookhurb/lounge/assignees{/user}","branches_url":"https://api.github.com/repos/spookhurb/lounge/branches{/branch}","tags_url":"https://api.github.com/repos/spookhurb/lounge/tags","blobs_url":"https://api.github.com/repos/spookhurb/lounge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spookhurb/lounge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spookhurb/lounge/git/refs{/sha}","trees_url":"https://api.github.com/repos/spookhurb/lounge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spookhurb/lounge/statuses/{sha}","languages_url":"https://api.github.com/repos/spookhurb/lounge/languages","stargazers_url":"https://api.github.com/repos/spookhurb/lounge/stargazers","contributors_url":"https://api.github.com/repos/spookhurb/lounge/contributors","subscribers_url":"https://api.github.com/repos/spookhurb/lounge/subscribers","subscription_url":"https://api.github.com/repos/spookhurb/lounge/subscription","commits_url":"https://api.github.com/repos/spookhurb/lounge/commits{/sha}","git_commits_url":"https://api.github.com/repos/spookhurb/lounge/git/commits{/sha}","comments_url":"https://api.github.com/repos/spookhurb/lounge/comments{/number}","issue_comment_url":"https://api.github.com/repos/spookhurb/lounge/issues/comments{/number}","contents_url":"https://api.github.com/repos/spookhurb/lounge/contents/{+path}","compare_url":"https://api.github.com/repos/spookhurb/lounge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spookhurb/lounge/merges","archive_url":"https://api.github.com/repos/spookhurb/lounge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spookhurb/lounge/downloads","issues_url":"https://api.github.com/repos/spookhurb/lounge/issues{/number}","pulls_url":"https://api.github.com/repos/spookhurb/lounge/pulls{/number}","milestones_url":"https://api.github.com/repos/spookhurb/lounge/milestones{/number}","notifications_url":"https://api.github.com/repos/spookhurb/lounge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spookhurb/lounge/labels{/name}","releases_url":"https://api.github.com/repos/spookhurb/lounge/releases{/id}","deployments_url":"https://api.github.com/repos/spookhurb/lounge/deployments","created_at":"2016-10-22T21:56:18Z","updated_at":"2016-10-22T21:56:19Z","pushed_at":"2016-10-25T03:17:32Z","git_url":"git://github.com/spookhurb/lounge.git","ssh_url":"git@github.com:spookhurb/lounge.git","clone_url":"https://github.com/spookhurb/lounge.git","svn_url":"https://github.com/spookhurb/lounge","homepage":"https://thelounge.github.io","size":5581,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"thelounge:master","ref":"master","sha":"61a582f71fd73a7e31c2fcdfdf60e4d39b427fd1","user":{"login":"thelounge","id":14336958,"avatar_url":"https://avatars.githubusercontent.com/u/14336958?v=3","gravatar_id":"","url":"https://api.github.com/users/thelounge","html_url":"https://github.com/thelounge","followers_url":"https://api.github.com/users/thelounge/followers","following_url":"https://api.github.com/users/thelounge/following{/other_user}","gists_url":"https://api.github.com/users/thelounge/gists{/gist_id}","starred_url":"https://api.github.com/users/thelounge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelounge/subscriptions","organizations_url":"https://api.github.com/users/thelounge/orgs","repos_url":"https://api.github.com/users/thelounge/repos","events_url":"https://api.github.com/users/thelounge/events{/privacy}","received_events_url":"https://api.github.com/users/thelounge/received_events","type":"Organization","site_admin":false},"repo":{"id":51344082,"name":"lounge","full_name":"thelounge/lounge","owner":{"login":"thelounge","id":14336958,"avatar_url":"https://avatars.githubusercontent.com/u/14336958?v=3","gravatar_id":"","url":"https://api.github.com/users/thelounge","html_url":"https://github.com/thelounge","followers_url":"https://api.github.com/users/thelounge/followers","following_url":"https://api.github.com/users/thelounge/following{/other_user}","gists_url":"https://api.github.com/users/thelounge/gists{/gist_id}","starred_url":"https://api.github.com/users/thelounge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelounge/subscriptions","organizations_url":"https://api.github.com/users/thelounge/orgs","repos_url":"https://api.github.com/users/thelounge/repos","events_url":"https://api.github.com/users/thelounge/events{/privacy}","received_events_url":"https://api.github.com/users/thelounge/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thelounge/lounge","description":"The Lounge — Self-hosted web IRC client","fork":false,"url":"https://api.github.com/repos/thelounge/lounge","forks_url":"https://api.github.com/repos/thelounge/lounge/forks","keys_url":"https://api.github.com/repos/thelounge/lounge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thelounge/lounge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thelounge/lounge/teams","hooks_url":"https://api.github.com/repos/thelounge/lounge/hooks","issue_events_url":"https://api.github.com/repos/thelounge/lounge/issues/events{/number}","events_url":"https://api.github.com/repos/thelounge/lounge/events","assignees_url":"https://api.github.com/repos/thelounge/lounge/assignees{/user}","branches_url":"https://api.github.com/repos/thelounge/lounge/branches{/branch}","tags_url":"https://api.github.com/repos/thelounge/lounge/tags","blobs_url":"https://api.github.com/repos/thelounge/lounge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thelounge/lounge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thelounge/lounge/git/refs{/sha}","trees_url":"https://api.github.com/repos/thelounge/lounge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thelounge/lounge/statuses/{sha}","languages_url":"https://api.github.com/repos/thelounge/lounge/languages","stargazers_url":"https://api.github.com/repos/thelounge/lounge/stargazers","contributors_url":"https://api.github.com/repos/thelounge/lounge/contributors","subscribers_url":"https://api.github.com/repos/thelounge/lounge/subscribers","subscription_url":"https://api.github.com/repos/thelounge/lounge/subscription","commits_url":"https://api.github.com/repos/thelounge/lounge/commits{/sha}","git_commits_url":"https://api.github.com/repos/thelounge/lounge/git/commits{/sha}","comments_url":"https://api.github.com/repos/thelounge/lounge/comments{/number}","issue_comment_url":"https://api.github.com/repos/thelounge/lounge/issues/comments{/number}","contents_url":"https://api.github.com/repos/thelounge/lounge/contents/{+path}","compare_url":"https://api.github.com/repos/thelounge/lounge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thelounge/lounge/merges","archive_url":"https://api.github.com/repos/thelounge/lounge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thelounge/lounge/downloads","issues_url":"https://api.github.com/repos/thelounge/lounge/issues{/number}","pulls_url":"https://api.github.com/repos/thelounge/lounge/pulls{/number}","milestones_url":"https://api.github.com/repos/thelounge/lounge/milestones{/number}","notifications_url":"https://api.github.com/repos/thelounge/lounge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thelounge/lounge/labels{/name}","releases_url":"https://api.github.com/repos/thelounge/lounge/releases{/id}","deployments_url":"https://api.github.com/repos/thelounge/lounge/deployments","created_at":"2016-02-09T03:16:03Z","updated_at":"2016-10-24T23:06:04Z","pushed_at":"2016-10-25T03:40:06Z","git_url":"git://github.com/thelounge/lounge.git","ssh_url":"git@github.com:thelounge/lounge.git","clone_url":"https://github.com/thelounge/lounge.git","svn_url":"https://github.com/thelounge/lounge","homepage":"https://thelounge.github.io","size":10577,"stargazers_count":764,"watchers_count":764,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":110,"mirror_url":null,"open_issues_count":159,"forks":110,"open_issues":159,"watchers":764,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thelounge/lounge/pulls/715"},"html":{"href":"https://github.com/thelounge/lounge/pull/715"},"issue":{"href":"https://api.github.com/repos/thelounge/lounge/issues/715"},"comments":{"href":"https://api.github.com/repos/thelounge/lounge/issues/715/comments"},"review_comments":{"href":"https://api.github.com/repos/thelounge/lounge/pulls/715/comments"},"review_comment":{"href":"https://api.github.com/repos/thelounge/lounge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thelounge/lounge/pulls/715/commits"},"statuses":{"href":"https://api.github.com/repos/thelounge/lounge/statuses/799bef9bec060de1cd298fb9f14bc2c4f453a415"}}}}
{"actor":{"display_login":"astorije"}}