{"action":"created","comment":{"url":"https://api.github.com/repos/belak/irc/pulls/comments/92976059","pull_request_review_id":13496749,"id":92976059,"diff_hunk":"@@ -29,11 +29,10 @@ var clientFilters = map[string]func(*Client, *Message){\n \t\t// Clean up CTCP stuff so everyone doesn't have to parse it\n \t\t// manually.\n \t\tlastArg := m.Trailing()\n-\t\tif len(lastArg) > 0 && lastArg[0] == '\\x01' {\n-\t\t\tif i := strings.LastIndex(lastArg, \"\\x01\"); i > -1 {\n-\t\t\t\tm.Command = \"CTCP\"\n-\t\t\t\tm.Params[len(m.Params)-1] = lastArg[1:i]\n-\t\t\t}\n+\t\tif len(lastArg) > 1 && lastArg[0] == '\\x01' &&\n+\t\t\tlastArg[len(lastArg)-1] == '\\x01' {\n+\t\t\tm.Command = \"CTCP\"\n+\t\t\tm.Params[len(m.Params)-1] = strings.Trim(lastArg, \"\\x01\")","path":"client.go","position":12,"original_position":12,"commit_id":"7da40079ede32d422020c33c4bf078698a1a477f","original_commit_id":"7da40079ede32d422020c33c4bf078698a1a477f","user":{"login":"belak","id":107097,"avatar_url":"https://avatars.githubusercontent.com/u/107097?v=3","gravatar_id":"","url":"https://api.github.com/users/belak","html_url":"https://github.com/belak","followers_url":"https://api.github.com/users/belak/followers","following_url":"https://api.github.com/users/belak/following{/other_user}","gists_url":"https://api.github.com/users/belak/gists{/gist_id}","starred_url":"https://api.github.com/users/belak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/belak/subscriptions","organizations_url":"https://api.github.com/users/belak/orgs","repos_url":"https://api.github.com/users/belak/repos","events_url":"https://api.github.com/users/belak/events{/privacy}","received_events_url":"https://api.github.com/users/belak/received_events","type":"User","site_admin":false},"body":"I'd rather just trim off the first and last character.","created_at":"2016-12-19T06:53:09Z","updated_at":"2016-12-19T06:53:37Z","html_url":"https://github.com/belak/irc/pull/47#discussion_r92976059","pull_request_url":"https://api.github.com/repos/belak/irc/pulls/47","_links":{"self":{"href":"https://api.github.com/repos/belak/irc/pulls/comments/92976059"},"html":{"href":"https://github.com/belak/irc/pull/47#discussion_r92976059"},"pull_request":{"href":"https://api.github.com/repos/belak/irc/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/belak/irc/pulls/47","id":98503007,"html_url":"https://github.com/belak/irc/pull/47","diff_url":"https://github.com/belak/irc/pull/47.diff","patch_url":"https://github.com/belak/irc/pull/47.patch","issue_url":"https://api.github.com/repos/belak/irc/issues/47","number":47,"state":"open","locked":false,"title":"Fix CTCP parsing to avoid segfault","user":{"login":"djt-code","id":19933071,"avatar_url":"https://avatars.githubusercontent.com/u/19933071?v=3","gravatar_id":"","url":"https://api.github.com/users/djt-code","html_url":"https://github.com/djt-code","followers_url":"https://api.github.com/users/djt-code/followers","following_url":"https://api.github.com/users/djt-code/following{/other_user}","gists_url":"https://api.github.com/users/djt-code/gists{/gist_id}","starred_url":"https://api.github.com/users/djt-code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djt-code/subscriptions","organizations_url":"https://api.github.com/users/djt-code/orgs","repos_url":"https://api.github.com/users/djt-code/repos","events_url":"https://api.github.com/users/djt-code/events{/privacy}","received_events_url":"https://api.github.com/users/djt-code/received_events","type":"User","site_admin":false},"body":"Previously, a check for the LastIndex was just ensuring that there WAS a \\x01 in the message, and not that the Last character in the string was a \\x01","created_at":"2016-12-19T03:37:54Z","updated_at":"2016-12-19T06:53:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2178ff8ad87005f59acb4048eeb8ee66b00e47e0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/belak/irc/pulls/47/commits","review_comments_url":"https://api.github.com/repos/belak/irc/pulls/47/comments","review_comment_url":"https://api.github.com/repos/belak/irc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/belak/irc/issues/47/comments","statuses_url":"https://api.github.com/repos/belak/irc/statuses/7da40079ede32d422020c33c4bf078698a1a477f","head":{"label":"djt-code:fix-ctcp-parse","ref":"fix-ctcp-parse","sha":"7da40079ede32d422020c33c4bf078698a1a477f","user":{"login":"djt-code","id":19933071,"avatar_url":"https://avatars.githubusercontent.com/u/19933071?v=3","gravatar_id":"","url":"https://api.github.com/users/djt-code","html_url":"https://github.com/djt-code","followers_url":"https://api.github.com/users/djt-code/followers","following_url":"https://api.github.com/users/djt-code/following{/other_user}","gists_url":"https://api.github.com/users/djt-code/gists{/gist_id}","starred_url":"https://api.github.com/users/djt-code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djt-code/subscriptions","organizations_url":"https://api.github.com/users/djt-code/orgs","repos_url":"https://api.github.com/users/djt-code/repos","events_url":"https://api.github.com/users/djt-code/events{/privacy}","received_events_url":"https://api.github.com/users/djt-code/received_events","type":"User","site_admin":false},"repo":{"id":76825051,"name":"irc","full_name":"djt-code/irc","owner":{"login":"djt-code","id":19933071,"avatar_url":"https://avatars.githubusercontent.com/u/19933071?v=3","gravatar_id":"","url":"https://api.github.com/users/djt-code","html_url":"https://github.com/djt-code","followers_url":"https://api.github.com/users/djt-code/followers","following_url":"https://api.github.com/users/djt-code/following{/other_user}","gists_url":"https://api.github.com/users/djt-code/gists{/gist_id}","starred_url":"https://api.github.com/users/djt-code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djt-code/subscriptions","organizations_url":"https://api.github.com/users/djt-code/orgs","repos_url":"https://api.github.com/users/djt-code/repos","events_url":"https://api.github.com/users/djt-code/events{/privacy}","received_events_url":"https://api.github.com/users/djt-code/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/djt-code/irc","description":"A golang IRC library based around the idea of simple, extendable handlers","fork":true,"url":"https://api.github.com/repos/djt-code/irc","forks_url":"https://api.github.com/repos/djt-code/irc/forks","keys_url":"https://api.github.com/repos/djt-code/irc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/djt-code/irc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/djt-code/irc/teams","hooks_url":"https://api.github.com/repos/djt-code/irc/hooks","issue_events_url":"https://api.github.com/repos/djt-code/irc/issues/events{/number}","events_url":"https://api.github.com/repos/djt-code/irc/events","assignees_url":"https://api.github.com/repos/djt-code/irc/assignees{/user}","branches_url":"https://api.github.com/repos/djt-code/irc/branches{/branch}","tags_url":"https://api.github.com/repos/djt-code/irc/tags","blobs_url":"https://api.github.com/repos/djt-code/irc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/djt-code/irc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/djt-code/irc/git/refs{/sha}","trees_url":"https://api.github.com/repos/djt-code/irc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/djt-code/irc/statuses/{sha}","languages_url":"https://api.github.com/repos/djt-code/irc/languages","stargazers_url":"https://api.github.com/repos/djt-code/irc/stargazers","contributors_url":"https://api.github.com/repos/djt-code/irc/contributors","subscribers_url":"https://api.github.com/repos/djt-code/irc/subscribers","subscription_url":"https://api.github.com/repos/djt-code/irc/subscription","commits_url":"https://api.github.com/repos/djt-code/irc/commits{/sha}","git_commits_url":"https://api.github.com/repos/djt-code/irc/git/commits{/sha}","comments_url":"https://api.github.com/repos/djt-code/irc/comments{/number}","issue_comment_url":"https://api.github.com/repos/djt-code/irc/issues/comments{/number}","contents_url":"https://api.github.com/repos/djt-code/irc/contents/{+path}","compare_url":"https://api.github.com/repos/djt-code/irc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/djt-code/irc/merges","archive_url":"https://api.github.com/repos/djt-code/irc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/djt-code/irc/downloads","issues_url":"https://api.github.com/repos/djt-code/irc/issues{/number}","pulls_url":"https://api.github.com/repos/djt-code/irc/pulls{/number}","milestones_url":"https://api.github.com/repos/djt-code/irc/milestones{/number}","notifications_url":"https://api.github.com/repos/djt-code/irc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/djt-code/irc/labels{/name}","releases_url":"https://api.github.com/repos/djt-code/irc/releases{/id}","deployments_url":"https://api.github.com/repos/djt-code/irc/deployments","created_at":"2016-12-19T03:32:40Z","updated_at":"2016-12-19T03:32:41Z","pushed_at":"2016-12-19T05:45:31Z","git_url":"git://github.com/djt-code/irc.git","ssh_url":"git@github.com:djt-code/irc.git","clone_url":"https://github.com/djt-code/irc.git","svn_url":"https://github.com/djt-code/irc","homepage":"","size":68,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"belak:master","ref":"master","sha":"9106fa6b0996a4acb2c968ad7c7a89b1dfcd68ea","user":{"login":"belak","id":107097,"avatar_url":"https://avatars.githubusercontent.com/u/107097?v=3","gravatar_id":"","url":"https://api.github.com/users/belak","html_url":"https://github.com/belak","followers_url":"https://api.github.com/users/belak/followers","following_url":"https://api.github.com/users/belak/following{/other_user}","gists_url":"https://api.github.com/users/belak/gists{/gist_id}","starred_url":"https://api.github.com/users/belak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/belak/subscriptions","organizations_url":"https://api.github.com/users/belak/orgs","repos_url":"https://api.github.com/users/belak/repos","events_url":"https://api.github.com/users/belak/events{/privacy}","received_events_url":"https://api.github.com/users/belak/received_events","type":"User","site_admin":false},"repo":{"id":25891870,"name":"irc","full_name":"belak/irc","owner":{"login":"belak","id":107097,"avatar_url":"https://avatars.githubusercontent.com/u/107097?v=3","gravatar_id":"","url":"https://api.github.com/users/belak","html_url":"https://github.com/belak","followers_url":"https://api.github.com/users/belak/followers","following_url":"https://api.github.com/users/belak/following{/other_user}","gists_url":"https://api.github.com/users/belak/gists{/gist_id}","starred_url":"https://api.github.com/users/belak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/belak/subscriptions","organizations_url":"https://api.github.com/users/belak/orgs","repos_url":"https://api.github.com/users/belak/repos","events_url":"https://api.github.com/users/belak/events{/privacy}","received_events_url":"https://api.github.com/users/belak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/belak/irc","description":"A golang IRC library based around the idea of simple, extendable handlers","fork":false,"url":"https://api.github.com/repos/belak/irc","forks_url":"https://api.github.com/repos/belak/irc/forks","keys_url":"https://api.github.com/repos/belak/irc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/belak/irc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/belak/irc/teams","hooks_url":"https://api.github.com/repos/belak/irc/hooks","issue_events_url":"https://api.github.com/repos/belak/irc/issues/events{/number}","events_url":"https://api.github.com/repos/belak/irc/events","assignees_url":"https://api.github.com/repos/belak/irc/assignees{/user}","branches_url":"https://api.github.com/repos/belak/irc/branches{/branch}","tags_url":"https://api.github.com/repos/belak/irc/tags","blobs_url":"https://api.github.com/repos/belak/irc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/belak/irc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/belak/irc/git/refs{/sha}","trees_url":"https://api.github.com/repos/belak/irc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/belak/irc/statuses/{sha}","languages_url":"https://api.github.com/repos/belak/irc/languages","stargazers_url":"https://api.github.com/repos/belak/irc/stargazers","contributors_url":"https://api.github.com/repos/belak/irc/contributors","subscribers_url":"https://api.github.com/repos/belak/irc/subscribers","subscription_url":"https://api.github.com/repos/belak/irc/subscription","commits_url":"https://api.github.com/repos/belak/irc/commits{/sha}","git_commits_url":"https://api.github.com/repos/belak/irc/git/commits{/sha}","comments_url":"https://api.github.com/repos/belak/irc/comments{/number}","issue_comment_url":"https://api.github.com/repos/belak/irc/issues/comments{/number}","contents_url":"https://api.github.com/repos/belak/irc/contents/{+path}","compare_url":"https://api.github.com/repos/belak/irc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/belak/irc/merges","archive_url":"https://api.github.com/repos/belak/irc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/belak/irc/downloads","issues_url":"https://api.github.com/repos/belak/irc/issues{/number}","pulls_url":"https://api.github.com/repos/belak/irc/pulls{/number}","milestones_url":"https://api.github.com/repos/belak/irc/milestones{/number}","notifications_url":"https://api.github.com/repos/belak/irc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/belak/irc/labels{/name}","releases_url":"https://api.github.com/repos/belak/irc/releases{/id}","deployments_url":"https://api.github.com/repos/belak/irc/deployments","created_at":"2014-10-28T21:51:25Z","updated_at":"2016-11-16T01:54:22Z","pushed_at":"2016-12-19T05:45:31Z","git_url":"git://github.com/belak/irc.git","ssh_url":"git@github.com:belak/irc.git","clone_url":"https://github.com/belak/irc.git","svn_url":"https://github.com/belak/irc","homepage":"","size":67,"stargazers_count":14,"watchers_count":14,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/belak/irc/pulls/47"},"html":{"href":"https://github.com/belak/irc/pull/47"},"issue":{"href":"https://api.github.com/repos/belak/irc/issues/47"},"comments":{"href":"https://api.github.com/repos/belak/irc/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/belak/irc/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/belak/irc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/belak/irc/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/belak/irc/statuses/7da40079ede32d422020c33c4bf078698a1a477f"}}}}
{"actor":{"display_login":"belak"}}