GitHub PullRequestReviewCommentEvent at 2014-10-18 06:05:54
Repository: aucgbot
Actor: auscompgeek
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/auscompgeek/aucgbot/pulls/comments/19052119","id":19052119,"diff_hunk":"@@ -122,141 +149,175 @@ aucgbot.connect = function connectBot(host, port, nick, ident, pass, chans, sasl\n \t\tconn.send(\"CAP REQ sasl\");\n \t}\n \n-\tconn.send(\"NICK\", conn.nick = nick || \"aucgbot\");\n+\tconn.send(\"NICK\", nick || \"aucgbot\");\n \tconn.send(\"USER\", ident || \"aucgbot\", \"8 * :\\x033\\x0fauscompgeek's JS bot\");\n-\n \tif (chans) {\n-\t\tif (chans instanceof Array)\n+\t\tif (chans instanceof Array) {\n \t\t\tchannels = chans;\n-\t\telse if (typeof chans === \"string\")\n+\t\t}\n+\t\telse if (typeof chans === \"string\") {\n \t\t\tchannels = chans.split(\",\");\n-\t\telse\n+\t\t}\n+\t\telse {\n \t\t\twriteln(\"[WARNING] Can't join channels specified! Joining \", channels);\n+\t\t}\n \t} else {\n \t\twriteln(\"[WARNING] No channels specified! Joining \", channels);\n \t}\n \tchans = null;\n-\n-\twhile ((ln = conn.readln().trim())) {\n-\t\twriteln(conn.addr, \": \", ln);\n-\t\tif (ln.startsWith(\"PING \")) {\n-\t\t\tconn.send(\"PONG\", ln.slice(5));\n-\t\t} else if (ln === \"AUTHENTICATE +\") {\n-\t\t\tconn.send(\"AUTHENTICATE\", encodeB64(sasluser + \"\\0\" + sasluser + \"\\0\" + saslpass));\n-\t\t\tsasluser = saslpass = null;\n-\t\t} else if (/^:\\S+ CAP \\S+ ACK :sasl/.test(ln)) {\n-\t\t\tconn.send(\"AUTHENTICATE PLAIN\");\n-\t\t} else if (/^:\\S+ 90([345]) ./.test(ln)) {\n-\t\t\tconn.send(\"CAP END\");\n-\t\t\tif (RegExp.$1 !== \"3\") {\n-\t\t\t\tconn.send(\"QUIT\");\n-\t\t\t\tconn.close();\n-\t\t\t\treturn;\n-\t\t\t}\n-\t\t\tbreak;\n-\t\t} else if (/^:\\S+ 433 ./.test(ln)) {\n-\t\t\tconn.send(\"NICK\", conn.nick += \"_\");\n-\t\t} else if (/^:\\S+ 003 ./.test(ln)) {\n-\t\t\tif (channels) {\n-\t\t\t\tconn.send(\"JOIN\", \":\" + channels.map(function (chan) conn.chantypes.contains(chan[0]) ? chan : \"#\" + chan).join(\",\"));\n-\t\t\t\tchannels = null;\n+\tconn.channels = channels;\n+\tconn.flood_lines = 0;\n+\tconn.joined = false;\n+\tconsole.log(\"Here we go...\");\n+\tconn.on(\"data\", function(data) {\n+\t\tvar lns = data.split(\"\\n\");\n+\t\tfor (let i = 0; i < lns.length; i++) {\n+\t\t\tconn.onLine(lns[i]);\n+\t\t}\n+\t});\n+\tconn.onLine = function(ln) {\n+\t\tln = ln.trim().trim();\n+\t\tif (!conn.joined) {","path":"aucgbot.js","position":247,"original_position":247,"commit_id":"092479aeef977a2afe0647a50b9e7cba302612c5","original_commit_id":"092479aeef977a2afe0647a50b9e7cba302612c5","user":{"login":"auscompgeek","id":128854,"avatar_url":"https://avatars.githubusercontent.com/u/128854?v=2","gravatar_id":"","url":"https://api.github.com/users/auscompgeek","html_url":"https://github.com/auscompgeek","followers_url":"https://api.github.com/users/auscompgeek/followers","following_url":"https://api.github.com/users/auscompgeek/following{/other_user}","gists_url":"https://api.github.com/users/auscompgeek/gists{/gist_id}","starred_url":"https://api.github.com/users/auscompgeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auscompgeek/subscriptions","organizations_url":"https://api.github.com/users/auscompgeek/orgs","repos_url":"https://api.github.com/users/auscompgeek/repos","events_url":"https://api.github.com/users/auscompgeek/events{/privacy}","received_events_url":"https://api.github.com/users/auscompgeek/received_events","type":"User","site_admin":false},"body":"s/joined/registered/?","created_at":"2014-10-18T06:05:54Z","updated_at":"2014-10-18T06:05:54Z","html_url":"https://github.com/auscompgeek/aucgbot/pull/9#discussion_r19052119","pull_request_url":"https://api.github.com/repos/auscompgeek/aucgbot/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/auscompgeek/aucgbot/pulls/comments/19052119"},"html":{"href":"https://github.com/auscompgeek/aucgbot/pull/9#discussion_r19052119"},"pull_request":{"href":"https://api.github.com/repos/auscompgeek/aucgbot/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/auscompgeek/aucgbot/pulls/9","id":22916800,"html_url":"https://github.com/auscompgeek/aucgbot/pull/9","diff_url":"https://github.com/auscompgeek/aucgbot/pull/9.diff","patch_url":"https://github.com/auscompgeek/aucgbot/pull/9.patch","issue_url":"https://api.github.com/repos/auscompgeek/aucgbot/issues/9","number":9,"state":"open","locked":false,"title":"Node.js all the things","user":{"login":"keepcalm444","id":4074767,"avatar_url":"https://avatars.githubusercontent.com/u/4074767?v=2","gravatar_id":"","url":"https://api.github.com/users/keepcalm444","html_url":"https://github.com/keepcalm444","followers_url":"https://api.github.com/users/keepcalm444/followers","following_url":"https://api.github.com/users/keepcalm444/following{/other_user}","gists_url":"https://api.github.com/users/keepcalm444/gists{/gist_id}","starred_url":"https://api.github.com/users/keepcalm444/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keepcalm444/subscriptions","organizations_url":"https://api.github.com/users/keepcalm444/orgs","repos_url":"https://api.github.com/users/keepcalm444/repos","events_url":"https://api.github.com/users/keepcalm444/events{/privacy}","received_events_url":"https://api.github.com/users/keepcalm444/received_events","type":"User","site_admin":false},"body":"Well all the really weird bugs are fixed.","created_at":"2014-10-17T10:51:06Z","updated_at":"2014-10-18T06:05:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a2f64be2e3c7db40b7e2b3056f9416e62356d13","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/auscompgeek/aucgbot/pulls/9/commits","review_comments_url":"https://api.github.com/repos/auscompgeek/aucgbot/pulls/9/comments","review_comment_url":"https://api.github.com/repos/auscompgeek/aucgbot/pulls/comments/{number}","comments_url":"https://api.github.com/repos/auscompgeek/aucgbot/issues/9/comments","statuses_url":"https://api.github.com/repos/auscompgeek/aucgbot/statuses/092479aeef977a2afe0647a50b9e7cba302612c5","head":{"label":"keepcalm444:nodejs","ref":"nodejs","sha":"092479aeef977a2afe0647a50b9e7cba302612c5","user":{"login":"keepcalm444","id":4074767,"avatar_url":"https://avatars.githubusercontent.com/u/4074767?v=2","gravatar_id":"","url":"https://api.github.com/users/keepcalm444","html_url":"https://github.com/keepcalm444","followers_url":"https://api.github.com/users/keepcalm444/followers","following_url":"https://api.github.com/users/keepcalm444/following{/other_user}","gists_url":"https://api.github.com/users/keepcalm444/gists{/gist_id}","starred_url":"https://api.github.com/users/keepcalm444/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keepcalm444/subscriptions","organizations_url":"https://api.github.com/users/keepcalm444/orgs","repos_url":"https://api.github.com/users/keepcalm444/repos","events_url":"https://api.github.com/users/keepcalm444/events{/privacy}","received_events_url":"https://api.github.com/users/keepcalm444/received_events","type":"User","site_admin":false},"repo":{"id":23986889,"name":"aucgbot","full_name":"keepcalm444/aucgbot","owner":{"login":"keepcalm444","id":4074767,"avatar_url":"https://avatars.githubusercontent.com/u/4074767?v=2","gravatar_id":"","url":"https://api.github.com/users/keepcalm444","html_url":"https://github.com/keepcalm444","followers_url":"https://api.github.com/users/keepcalm444/followers","following_url":"https://api.github.com/users/keepcalm444/following{/other_user}","gists_url":"https://api.github.com/users/keepcalm444/gists{/gist_id}","starred_url":"https://api.github.com/users/keepcalm444/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keepcalm444/subscriptions","organizations_url":"https://api.github.com/users/keepcalm444/orgs","repos_url":"https://api.github.com/users/keepcalm444/repos","events_url":"https://api.github.com/users/keepcalm444/events{/privacy}","received_events_url":"https://api.github.com/users/keepcalm444/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/keepcalm444/aucgbot","description":"auscompgeek's IRC bot written in JS","fork":true,"url":"https://api.github.com/repos/keepcalm444/aucgbot","forks_url":"https://api.github.com/repos/keepcalm444/aucgbot/forks","keys_url":"https://api.github.com/repos/keepcalm444/aucgbot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keepcalm444/aucgbot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keepcalm444/aucgbot/teams","hooks_url":"https://api.github.com/repos/keepcalm444/aucgbot/hooks","issue_events_url":"https://api.github.com/repos/keepcalm444/aucgbot/issues/events{/number}","events_url":"https://api.github.com/repos/keepcalm444/aucgbot/events","assignees_url":"https://api.github.com/repos/keepcalm444/aucgbot/assignees{/user}","branches_url":"https://api.github.com/repos/keepcalm444/aucgbot/branches{/branch}","tags_url":"https://api.github.com/repos/keepcalm444/aucgbot/tags","blobs_url":"https://api.github.com/repos/keepcalm444/aucgbot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keepcalm444/aucgbot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keepcalm444/aucgbot/git/refs{/sha}","trees_url":"https://api.github.com/repos/keepcalm444/aucgbot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keepcalm444/aucgbot/statuses/{sha}","languages_url":"https://api.github.com/repos/keepcalm444/aucgbot/languages","stargazers_url":"https://api.github.com/repos/keepcalm444/aucgbot/stargazers","contributors_url":"https://api.github.com/repos/keepcalm444/aucgbot/contributors","subscribers_url":"https://api.github.com/repos/keepcalm444/aucgbot/subscribers","subscription_url":"https://api.github.com/repos/keepcalm444/aucgbot/subscription","commits_url":"https://api.github.com/repos/keepcalm444/aucgbot/commits{/sha}","git_commits_url":"https://api.github.com/repos/keepcalm444/aucgbot/git/commits{/sha}","comments_url":"https://api.github.com/repos/keepcalm444/aucgbot/comments{/number}","issue_comment_url":"https://api.github.com/repos/keepcalm444/aucgbot/issues/comments/{number}","contents_url":"https://api.github.com/repos/keepcalm444/aucgbot/contents/{+path}","compare_url":"https://api.github.com/repos/keepcalm444/aucgbot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keepcalm444/aucgbot/merges","archive_url":"https://api.github.com/repos/keepcalm444/aucgbot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keepcalm444/aucgbot/downloads","issues_url":"https://api.github.com/repos/keepcalm444/aucgbot/issues{/number}","pulls_url":"https://api.github.com/repos/keepcalm444/aucgbot/pulls{/number}","milestones_url":"https://api.github.com/repos/keepcalm444/aucgbot/milestones{/number}","notifications_url":"https://api.github.com/repos/keepcalm444/aucgbot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keepcalm444/aucgbot/labels{/name}","releases_url":"https://api.github.com/repos/keepcalm444/aucgbot/releases{/id}","created_at":"2014-09-13T05:38:59Z","updated_at":"2014-09-13T12:29:40Z","pushed_at":"2014-10-17T10:48:29Z","git_url":"git://github.com/keepcalm444/aucgbot.git","ssh_url":"git@github.com:keepcalm444/aucgbot.git","clone_url":"https://github.com/keepcalm444/aucgbot.git","svn_url":"https://github.com/keepcalm444/aucgbot","homepage":"aucg.cadoth.net/aucgbot/","size":597,"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":"auscompgeek:master","ref":"master","sha":"c29477e1d0dcabbfa7f9701269264c51f99827c9","user":{"login":"auscompgeek","id":128854,"avatar_url":"https://avatars.githubusercontent.com/u/128854?v=2","gravatar_id":"","url":"https://api.github.com/users/auscompgeek","html_url":"https://github.com/auscompgeek","followers_url":"https://api.github.com/users/auscompgeek/followers","following_url":"https://api.github.com/users/auscompgeek/following{/other_user}","gists_url":"https://api.github.com/users/auscompgeek/gists{/gist_id}","starred_url":"https://api.github.com/users/auscompgeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auscompgeek/subscriptions","organizations_url":"https://api.github.com/users/auscompgeek/orgs","repos_url":"https://api.github.com/users/auscompgeek/repos","events_url":"https://api.github.com/users/auscompgeek/events{/privacy}","received_events_url":"https://api.github.com/users/auscompgeek/received_events","type":"User","site_admin":false},"repo":{"id":947129,"name":"aucgbot","full_name":"auscompgeek/aucgbot","owner":{"login":"auscompgeek","id":128854,"avatar_url":"https://avatars.githubusercontent.com/u/128854?v=2","gravatar_id":"","url":"https://api.github.com/users/auscompgeek","html_url":"https://github.com/auscompgeek","followers_url":"https://api.github.com/users/auscompgeek/followers","following_url":"https://api.github.com/users/auscompgeek/following{/other_user}","gists_url":"https://api.github.com/users/auscompgeek/gists{/gist_id}","starred_url":"https://api.github.com/users/auscompgeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auscompgeek/subscriptions","organizations_url":"https://api.github.com/users/auscompgeek/orgs","repos_url":"https://api.github.com/users/auscompgeek/repos","events_url":"https://api.github.com/users/auscompgeek/events{/privacy}","received_events_url":"https://api.github.com/users/auscompgeek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/auscompgeek/aucgbot","description":"auscompgeek's IRC bot written in JS","fork":false,"url":"https://api.github.com/repos/auscompgeek/aucgbot","forks_url":"https://api.github.com/repos/auscompgeek/aucgbot/forks","keys_url":"https://api.github.com/repos/auscompgeek/aucgbot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/auscompgeek/aucgbot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/auscompgeek/aucgbot/teams","hooks_url":"https://api.github.com/repos/auscompgeek/aucgbot/hooks","issue_events_url":"https://api.github.com/repos/auscompgeek/aucgbot/issues/events{/number}","events_url":"https://api.github.com/repos/auscompgeek/aucgbot/events","assignees_url":"https://api.github.com/repos/auscompgeek/aucgbot/assignees{/user}","branches_url":"https://api.github.com/repos/auscompgeek/aucgbot/branches{/branch}","tags_url":"https://api.github.com/repos/auscompgeek/aucgbot/tags","blobs_url":"https://api.github.com/repos/auscompgeek/aucgbot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/auscompgeek/aucgbot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/auscompgeek/aucgbot/git/refs{/sha}","trees_url":"https://api.github.com/repos/auscompgeek/aucgbot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/auscompgeek/aucgbot/statuses/{sha}","languages_url":"https://api.github.com/repos/auscompgeek/aucgbot/languages","stargazers_url":"https://api.github.com/repos/auscompgeek/aucgbot/stargazers","contributors_url":"https://api.github.com/repos/auscompgeek/aucgbot/contributors","subscribers_url":"https://api.github.com/repos/auscompgeek/aucgbot/subscribers","subscription_url":"https://api.github.com/repos/auscompgeek/aucgbot/subscription","commits_url":"https://api.github.com/repos/auscompgeek/aucgbot/commits{/sha}","git_commits_url":"https://api.github.com/repos/auscompgeek/aucgbot/git/commits{/sha}","comments_url":"https://api.github.com/repos/auscompgeek/aucgbot/comments{/number}","issue_comment_url":"https://api.github.com/repos/auscompgeek/aucgbot/issues/comments/{number}","contents_url":"https://api.github.com/repos/auscompgeek/aucgbot/contents/{+path}","compare_url":"https://api.github.com/repos/auscompgeek/aucgbot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/auscompgeek/aucgbot/merges","archive_url":"https://api.github.com/repos/auscompgeek/aucgbot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/auscompgeek/aucgbot/downloads","issues_url":"https://api.github.com/repos/auscompgeek/aucgbot/issues{/number}","pulls_url":"https://api.github.com/repos/auscompgeek/aucgbot/pulls{/number}","milestones_url":"https://api.github.com/repos/auscompgeek/aucgbot/milestones{/number}","notifications_url":"https://api.github.com/repos/auscompgeek/aucgbot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/auscompgeek/aucgbot/labels{/name}","releases_url":"https://api.github.com/repos/auscompgeek/aucgbot/releases{/id}","created_at":"2010-09-29T00:55:24Z","updated_at":"2014-09-13T13:49:11Z","pushed_at":"2014-09-13T13:47:54Z","git_url":"git://github.com/auscompgeek/aucgbot.git","ssh_url":"git@github.com:auscompgeek/aucgbot.git","clone_url":"https://github.com/auscompgeek/aucgbot.git","svn_url":"https://github.com/auscompgeek/aucgbot","homepage":"","size":1665,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/auscompgeek/aucgbot/pulls/9"},"html":{"href":"https://github.com/auscompgeek/aucgbot/pull/9"},"issue":{"href":"https://api.github.com/repos/auscompgeek/aucgbot/issues/9"},"comments":{"href":"https://api.github.com/repos/auscompgeek/aucgbot/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/auscompgeek/aucgbot/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/auscompgeek/aucgbot/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/auscompgeek/aucgbot/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/auscompgeek/aucgbot/statuses/092479aeef977a2afe0647a50b9e7cba302612c5"}}}}