{"action":"created","comment":{"url":"https://api.github.com/repos/bitlbee/bitlbee/pulls/comments/40863334","id":40863334,"diff_hunk":"@@ -0,0 +1,174 @@\n+/********************************************************************\\\n+  * BitlBee -- An IRC to other IM-networks gateway                     *\n+  *                                                                    *\n+  * Copyright 2002-2013 Wilmer van der Gaast and others                *\n+  \\********************************************************************/\n+\n+/* IRCv3 CAP command                                                    */\n+\n+/*\n+  This program is free software; you can redistribute it and/or modify\n+  it under the terms of the GNU General Public License as published by\n+  the Free Software Foundation; either version 2 of the License, or\n+  (at your option) any later version.\n+\n+  This program is distributed in the hope that it will be useful,\n+  but WITHOUT ANY WARRANTY; without even the implied warranty of\n+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+  GNU General Public License for more details.\n+\n+  You should have received a copy of the GNU General Public License with\n+  the Debian GNU/Linux distribution in /usr/share/common-licenses/GPL;\n+  if not, write to the Free Software Foundation, Inc., 51 Franklin St.,\n+  Fifth Floor, Boston, MA  02110-1301  USA\n+*/\n+\n+#include \"bitlbee.h\"\n+\n+typedef struct {\n+\tchar *name;\n+\tirc_cap_flag_t flag;\n+} cap_info_t;\n+\n+static const cap_info_t supported_caps[] = {\n+\t{\"foo\", CAP_FOO},\n+\t{\"bar\", CAP_BAR},\n+\t{NULL},\n+};\n+\n+static irc_cap_flag_t cap_flag_from_string(char *cap_name)\n+{\n+\tint i;\n+\n+\tif (!cap_name && !cap_name[0]) {\n+\t\treturn 0;\n+\t}\n+\n+\tif (cap_name[0] == '-') {\n+\t\tcap_name++;\n+\t}\n+\n+\tfor (i = 0; supported_caps[i].name; i++) {\n+\t\tif (strcmp(supported_caps[i].name, cap_name) == 0) {\n+\t\t\treturn supported_caps[i].flag;\n+\t\t}\n+\t}\n+\treturn 0;\n+}\n+\n+static gboolean irc_cmd_cap_req(irc_t *irc, char *caps)\n+{\n+\tint i;\n+\tchar *lower = NULL;\n+        char **split = NULL;","path":"irc_cap.c","position":63,"original_position":63,"commit_id":"2cb7cb8dc536e80714cc52f541f173735b1901d5","original_commit_id":"2cb7cb8dc536e80714cc52f541f173735b1901d5","user":{"login":"Wilm0r","id":6828117,"avatar_url":"https://avatars.githubusercontent.com/u/6828117?v=3","gravatar_id":"","url":"https://api.github.com/users/Wilm0r","html_url":"https://github.com/Wilm0r","followers_url":"https://api.github.com/users/Wilm0r/followers","following_url":"https://api.github.com/users/Wilm0r/following{/other_user}","gists_url":"https://api.github.com/users/Wilm0r/gists{/gist_id}","starred_url":"https://api.github.com/users/Wilm0r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wilm0r/subscriptions","organizations_url":"https://api.github.com/users/Wilm0r/orgs","repos_url":"https://api.github.com/users/Wilm0r/repos","events_url":"https://api.github.com/users/Wilm0r/events{/privacy}","received_events_url":"https://api.github.com/users/Wilm0r/received_events","type":"User","site_admin":false},"body":"Spaces instead of tab?","created_at":"2015-09-30T23:00:06Z","updated_at":"2015-09-30T23:00:06Z","html_url":"https://github.com/bitlbee/bitlbee/pull/47#discussion_r40863334","pull_request_url":"https://api.github.com/repos/bitlbee/bitlbee/pulls/47","_links":{"self":{"href":"https://api.github.com/repos/bitlbee/bitlbee/pulls/comments/40863334"},"html":{"href":"https://github.com/bitlbee/bitlbee/pull/47#discussion_r40863334"},"pull_request":{"href":"https://api.github.com/repos/bitlbee/bitlbee/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/bitlbee/bitlbee/pulls/47","id":44837663,"html_url":"https://github.com/bitlbee/bitlbee/pull/47","diff_url":"https://github.com/bitlbee/bitlbee/pull/47.diff","patch_url":"https://github.com/bitlbee/bitlbee/pull/47.patch","issue_url":"https://api.github.com/repos/bitlbee/bitlbee/issues/47","number":47,"state":"open","locked":false,"title":"IRCv3 capability negotiation","user":{"login":"dequis","id":94108,"avatar_url":"https://avatars.githubusercontent.com/u/94108?v=3","gravatar_id":"","url":"https://api.github.com/users/dequis","html_url":"https://github.com/dequis","followers_url":"https://api.github.com/users/dequis/followers","following_url":"https://api.github.com/users/dequis/following{/other_user}","gists_url":"https://api.github.com/users/dequis/gists{/gist_id}","starred_url":"https://api.github.com/users/dequis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dequis/subscriptions","organizations_url":"https://api.github.com/users/dequis/orgs","repos_url":"https://api.github.com/users/dequis/repos","events_url":"https://api.github.com/users/dequis/events{/privacy}","received_events_url":"https://api.github.com/users/dequis/received_events","type":"User","site_admin":false},"body":"Specs: [capability-negotiation-3.1](http://ircv3.net/specs/core/capability-negotiation-3.1.html) and [capability-negotiation-3.2](http://ircv3.net/specs/core/capability-negotiation-3.2.html)\r\n\r\nThe 3.2 spec is important because it deprecates several rarely used 3.1 features. The 3.1 spec is a mess. This is compliant with 3.2 by not doing anything - it doesn't need multiline replies or capabilities with values. Implementing sasl-3.2 changes that (it requires values), but that one is optional.\r\n\r\nShould have PR'd this before #46, but, whatever. It's old code, I think jgeboski already said it looks good. Don't think I've heard from wilmer about this.","created_at":"2015-09-11T22:53:25Z","updated_at":"2015-09-30T23:00:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3fe4f2fc01577b7c4ab748e40a67d36daac1c67b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bitlbee/bitlbee/pulls/47/commits","review_comments_url":"https://api.github.com/repos/bitlbee/bitlbee/pulls/47/comments","review_comment_url":"https://api.github.com/repos/bitlbee/bitlbee/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitlbee/bitlbee/issues/47/comments","statuses_url":"https://api.github.com/repos/bitlbee/bitlbee/statuses/2cb7cb8dc536e80714cc52f541f173735b1901d5","head":{"label":"bitlbee:wip/ircv3","ref":"wip/ircv3","sha":"2cb7cb8dc536e80714cc52f541f173735b1901d5","user":{"login":"bitlbee","id":6410240,"avatar_url":"https://avatars.githubusercontent.com/u/6410240?v=3","gravatar_id":"","url":"https://api.github.com/users/bitlbee","html_url":"https://github.com/bitlbee","followers_url":"https://api.github.com/users/bitlbee/followers","following_url":"https://api.github.com/users/bitlbee/following{/other_user}","gists_url":"https://api.github.com/users/bitlbee/gists{/gist_id}","starred_url":"https://api.github.com/users/bitlbee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitlbee/subscriptions","organizations_url":"https://api.github.com/users/bitlbee/orgs","repos_url":"https://api.github.com/users/bitlbee/repos","events_url":"https://api.github.com/users/bitlbee/events{/privacy}","received_events_url":"https://api.github.com/users/bitlbee/received_events","type":"Organization","site_admin":false},"repo":{"id":29792084,"name":"bitlbee","full_name":"bitlbee/bitlbee","owner":{"login":"bitlbee","id":6410240,"avatar_url":"https://avatars.githubusercontent.com/u/6410240?v=3","gravatar_id":"","url":"https://api.github.com/users/bitlbee","html_url":"https://github.com/bitlbee","followers_url":"https://api.github.com/users/bitlbee/followers","following_url":"https://api.github.com/users/bitlbee/following{/other_user}","gists_url":"https://api.github.com/users/bitlbee/gists{/gist_id}","starred_url":"https://api.github.com/users/bitlbee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitlbee/subscriptions","organizations_url":"https://api.github.com/users/bitlbee/orgs","repos_url":"https://api.github.com/users/bitlbee/repos","events_url":"https://api.github.com/users/bitlbee/events{/privacy}","received_events_url":"https://api.github.com/users/bitlbee/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitlbee/bitlbee","description":"An IRC to other chat networks gateway","fork":false,"url":"https://api.github.com/repos/bitlbee/bitlbee","forks_url":"https://api.github.com/repos/bitlbee/bitlbee/forks","keys_url":"https://api.github.com/repos/bitlbee/bitlbee/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitlbee/bitlbee/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitlbee/bitlbee/teams","hooks_url":"https://api.github.com/repos/bitlbee/bitlbee/hooks","issue_events_url":"https://api.github.com/repos/bitlbee/bitlbee/issues/events{/number}","events_url":"https://api.github.com/repos/bitlbee/bitlbee/events","assignees_url":"https://api.github.com/repos/bitlbee/bitlbee/assignees{/user}","branches_url":"https://api.github.com/repos/bitlbee/bitlbee/branches{/branch}","tags_url":"https://api.github.com/repos/bitlbee/bitlbee/tags","blobs_url":"https://api.github.com/repos/bitlbee/bitlbee/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitlbee/bitlbee/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitlbee/bitlbee/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitlbee/bitlbee/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitlbee/bitlbee/statuses/{sha}","languages_url":"https://api.github.com/repos/bitlbee/bitlbee/languages","stargazers_url":"https://api.github.com/repos/bitlbee/bitlbee/stargazers","contributors_url":"https://api.github.com/repos/bitlbee/bitlbee/contributors","subscribers_url":"https://api.github.com/repos/bitlbee/bitlbee/subscribers","subscription_url":"https://api.github.com/repos/bitlbee/bitlbee/subscription","commits_url":"https://api.github.com/repos/bitlbee/bitlbee/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitlbee/bitlbee/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitlbee/bitlbee/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitlbee/bitlbee/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitlbee/bitlbee/contents/{+path}","compare_url":"https://api.github.com/repos/bitlbee/bitlbee/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitlbee/bitlbee/merges","archive_url":"https://api.github.com/repos/bitlbee/bitlbee/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitlbee/bitlbee/downloads","issues_url":"https://api.github.com/repos/bitlbee/bitlbee/issues{/number}","pulls_url":"https://api.github.com/repos/bitlbee/bitlbee/pulls{/number}","milestones_url":"https://api.github.com/repos/bitlbee/bitlbee/milestones{/number}","notifications_url":"https://api.github.com/repos/bitlbee/bitlbee/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitlbee/bitlbee/labels{/name}","releases_url":"https://api.github.com/repos/bitlbee/bitlbee/releases{/id}","created_at":"2015-01-24T21:21:23Z","updated_at":"2015-09-30T09:44:31Z","pushed_at":"2015-09-16T06:14:48Z","git_url":"git://github.com/bitlbee/bitlbee.git","ssh_url":"git@github.com:bitlbee/bitlbee.git","clone_url":"https://github.com/bitlbee/bitlbee.git","svn_url":"https://github.com/bitlbee/bitlbee","homepage":"http://www.bitlbee.org/","size":7957,"stargazers_count":133,"watchers_count":133,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":7,"forks":32,"open_issues":7,"watchers":133,"default_branch":"master"}},"base":{"label":"bitlbee:develop","ref":"develop","sha":"34d16d5b4b5265990125894572a90493284358cd","user":{"login":"bitlbee","id":6410240,"avatar_url":"https://avatars.githubusercontent.com/u/6410240?v=3","gravatar_id":"","url":"https://api.github.com/users/bitlbee","html_url":"https://github.com/bitlbee","followers_url":"https://api.github.com/users/bitlbee/followers","following_url":"https://api.github.com/users/bitlbee/following{/other_user}","gists_url":"https://api.github.com/users/bitlbee/gists{/gist_id}","starred_url":"https://api.github.com/users/bitlbee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitlbee/subscriptions","organizations_url":"https://api.github.com/users/bitlbee/orgs","repos_url":"https://api.github.com/users/bitlbee/repos","events_url":"https://api.github.com/users/bitlbee/events{/privacy}","received_events_url":"https://api.github.com/users/bitlbee/received_events","type":"Organization","site_admin":false},"repo":{"id":29792084,"name":"bitlbee","full_name":"bitlbee/bitlbee","owner":{"login":"bitlbee","id":6410240,"avatar_url":"https://avatars.githubusercontent.com/u/6410240?v=3","gravatar_id":"","url":"https://api.github.com/users/bitlbee","html_url":"https://github.com/bitlbee","followers_url":"https://api.github.com/users/bitlbee/followers","following_url":"https://api.github.com/users/bitlbee/following{/other_user}","gists_url":"https://api.github.com/users/bitlbee/gists{/gist_id}","starred_url":"https://api.github.com/users/bitlbee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitlbee/subscriptions","organizations_url":"https://api.github.com/users/bitlbee/orgs","repos_url":"https://api.github.com/users/bitlbee/repos","events_url":"https://api.github.com/users/bitlbee/events{/privacy}","received_events_url":"https://api.github.com/users/bitlbee/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitlbee/bitlbee","description":"An IRC to other chat networks gateway","fork":false,"url":"https://api.github.com/repos/bitlbee/bitlbee","forks_url":"https://api.github.com/repos/bitlbee/bitlbee/forks","keys_url":"https://api.github.com/repos/bitlbee/bitlbee/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitlbee/bitlbee/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitlbee/bitlbee/teams","hooks_url":"https://api.github.com/repos/bitlbee/bitlbee/hooks","issue_events_url":"https://api.github.com/repos/bitlbee/bitlbee/issues/events{/number}","events_url":"https://api.github.com/repos/bitlbee/bitlbee/events","assignees_url":"https://api.github.com/repos/bitlbee/bitlbee/assignees{/user}","branches_url":"https://api.github.com/repos/bitlbee/bitlbee/branches{/branch}","tags_url":"https://api.github.com/repos/bitlbee/bitlbee/tags","blobs_url":"https://api.github.com/repos/bitlbee/bitlbee/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitlbee/bitlbee/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitlbee/bitlbee/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitlbee/bitlbee/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitlbee/bitlbee/statuses/{sha}","languages_url":"https://api.github.com/repos/bitlbee/bitlbee/languages","stargazers_url":"https://api.github.com/repos/bitlbee/bitlbee/stargazers","contributors_url":"https://api.github.com/repos/bitlbee/bitlbee/contributors","subscribers_url":"https://api.github.com/repos/bitlbee/bitlbee/subscribers","subscription_url":"https://api.github.com/repos/bitlbee/bitlbee/subscription","commits_url":"https://api.github.com/repos/bitlbee/bitlbee/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitlbee/bitlbee/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitlbee/bitlbee/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitlbee/bitlbee/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitlbee/bitlbee/contents/{+path}","compare_url":"https://api.github.com/repos/bitlbee/bitlbee/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitlbee/bitlbee/merges","archive_url":"https://api.github.com/repos/bitlbee/bitlbee/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitlbee/bitlbee/downloads","issues_url":"https://api.github.com/repos/bitlbee/bitlbee/issues{/number}","pulls_url":"https://api.github.com/repos/bitlbee/bitlbee/pulls{/number}","milestones_url":"https://api.github.com/repos/bitlbee/bitlbee/milestones{/number}","notifications_url":"https://api.github.com/repos/bitlbee/bitlbee/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitlbee/bitlbee/labels{/name}","releases_url":"https://api.github.com/repos/bitlbee/bitlbee/releases{/id}","created_at":"2015-01-24T21:21:23Z","updated_at":"2015-09-30T09:44:31Z","pushed_at":"2015-09-16T06:14:48Z","git_url":"git://github.com/bitlbee/bitlbee.git","ssh_url":"git@github.com:bitlbee/bitlbee.git","clone_url":"https://github.com/bitlbee/bitlbee.git","svn_url":"https://github.com/bitlbee/bitlbee","homepage":"http://www.bitlbee.org/","size":7957,"stargazers_count":133,"watchers_count":133,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":7,"forks":32,"open_issues":7,"watchers":133,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitlbee/bitlbee/pulls/47"},"html":{"href":"https://github.com/bitlbee/bitlbee/pull/47"},"issue":{"href":"https://api.github.com/repos/bitlbee/bitlbee/issues/47"},"comments":{"href":"https://api.github.com/repos/bitlbee/bitlbee/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/bitlbee/bitlbee/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/bitlbee/bitlbee/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitlbee/bitlbee/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/bitlbee/bitlbee/statuses/2cb7cb8dc536e80714cc52f541f173735b1901d5"}}}}