{"action":"created","comment":{"url":"https://api.github.com/repos/znc/znc/pulls/comments/25998937","id":25998937,"diff_hunk":"@@ -423,6 +423,67 @@ void CClient::UserCommand(CString& sLine) {\n \t\t\tPutStatus(\"There were [\" + CString(sChans.size()) + \"] channels matching [\" + sPatterns + \"]\");\n \t\t\tPutStatus(\"Disabled [\" + CString(uDisabled) + \"] channels\");\n \t\t}\n+\t} else if (sCommand.Equals(\"SHOWCHAN\")) {\n+\t\tif (!m_pNetwork) {\n+\t\t\tPutStatus(\"You must be connected with a network to use this command\");\n+\t\t\treturn;\n+\t\t}\n+\n+\t\tCString sChan = sLine.Token(1, true);\n+\t\tif (sChan.empty()) {\n+\t\t\tPutStatus(\"Usage: ShowChan <#chan>\");\n+\t\t\treturn;\n+\t\t}\n+\n+\t\tCChan* pChan = m_pNetwork->FindChan(sChan);\n+\t\tif (!pChan) {\n+\t\t\tPutStatus(\"No such channel [\" + sChan + \"]\");\n+\t\t\treturn;\n+\t\t}\n+\t\tsChan = pChan->GetPermStr() + pChan->GetName();\n+\t\tCString sStatus = pChan->IsOn() ? (pChan->IsDetached() ? \"Detached\" : \"Joined\") : (pChan->IsDisabled() ? \"Disabled\" : \"Trying\");\n+\n+\t\tCTable Table;\n+\t\tTable.AddColumn(sChan, false);\n+\t\tTable.AddColumn(sStatus);\n+\n+\t\tTable.AddRow();\n+\t\tTable.SetCell(sChan, \"InConfig\");\n+\t\tTable.SetCell(sStatus, CString(pChan->InConfig() ? \"yes\" : \"no\"));\n+\n+\t\tTable.AddRow();\n+\t\tTable.SetCell(sChan, \"Buffer\");\n+\t\tTable.SetCell(sStatus, CString(pChan->GetBuffer().Size()) + \"/\" + CString(pChan->GetBufferCount()) + CString(pChan->HasBufferCountSet() ? \"\" : \" (default)\"));\n+\n+\t\tTable.AddRow();\n+\t\tTable.SetCell(sChan, \"AutoClearChanBuffer\");\n+\t\tTable.SetCell(sStatus, CString(pChan->AutoClearChanBuffer() ? \"yes\" : \"no\") + CString(pChan->HasAutoClearChanBufferSet() ? \"\" : \" (default)\"));","path":"src/ClientCommand.cpp","position":38,"original_position":38,"commit_id":"33825439170a3b2762db5d97d9474170d398e3f0","original_commit_id":"33825439170a3b2762db5d97d9474170d398e3f0","user":{"login":"DarthGandalf","id":325092,"avatar_url":"https://avatars.githubusercontent.com/u/325092?v=3","gravatar_id":"","url":"https://api.github.com/users/DarthGandalf","html_url":"https://github.com/DarthGandalf","followers_url":"https://api.github.com/users/DarthGandalf/followers","following_url":"https://api.github.com/users/DarthGandalf/following{/other_user}","gists_url":"https://api.github.com/users/DarthGandalf/gists{/gist_id}","starred_url":"https://api.github.com/users/DarthGandalf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DarthGandalf/subscriptions","organizations_url":"https://api.github.com/users/DarthGandalf/orgs","repos_url":"https://api.github.com/users/DarthGandalf/repos","events_url":"https://api.github.com/users/DarthGandalf/events{/privacy}","received_events_url":"https://api.github.com/users/DarthGandalf/received_events","type":"User","site_admin":false},"body":"With C++14, it will be possible to use `\"yes\"s` instead of `CString()`","created_at":"2015-03-07T19:52:02Z","updated_at":"2015-03-07T19:52:02Z","html_url":"https://github.com/znc/znc/pull/916#discussion_r25998937","pull_request_url":"https://api.github.com/repos/znc/znc/pulls/916","_links":{"self":{"href":"https://api.github.com/repos/znc/znc/pulls/comments/25998937"},"html":{"href":"https://github.com/znc/znc/pull/916#discussion_r25998937"},"pull_request":{"href":"https://api.github.com/repos/znc/znc/pulls/916"}}},"pull_request":{"url":"https://api.github.com/repos/znc/znc/pulls/916","id":30421951,"html_url":"https://github.com/znc/znc/pull/916","diff_url":"https://github.com/znc/znc/pull/916.diff","patch_url":"https://github.com/znc/znc/pull/916.patch","issue_url":"https://api.github.com/repos/znc/znc/issues/916","number":916,"state":"open","locked":false,"title":"Add ShowChan & minimize ListChans columns","user":{"login":"jpnurmi","id":140617,"avatar_url":"https://avatars.githubusercontent.com/u/140617?v=3","gravatar_id":"","url":"https://api.github.com/users/jpnurmi","html_url":"https://github.com/jpnurmi","followers_url":"https://api.github.com/users/jpnurmi/followers","following_url":"https://api.github.com/users/jpnurmi/following{/other_user}","gists_url":"https://api.github.com/users/jpnurmi/gists{/gist_id}","starred_url":"https://api.github.com/users/jpnurmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpnurmi/subscriptions","organizations_url":"https://api.github.com/users/jpnurmi/orgs","repos_url":"https://api.github.com/users/jpnurmi/repos","events_url":"https://api.github.com/users/jpnurmi/events{/privacy}","received_events_url":"https://api.github.com/users/jpnurmi/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-03T23:00:09Z","updated_at":"2015-03-07T19:52:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a358d9009919c5b5e25f3382d3438178655dd51b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/znc/znc/pulls/916/commits","review_comments_url":"https://api.github.com/repos/znc/znc/pulls/916/comments","review_comment_url":"https://api.github.com/repos/znc/znc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/znc/znc/issues/916/comments","statuses_url":"https://api.github.com/repos/znc/znc/statuses/33825439170a3b2762db5d97d9474170d398e3f0","head":{"label":"jpnurmi:tables","ref":"tables","sha":"33825439170a3b2762db5d97d9474170d398e3f0","user":{"login":"jpnurmi","id":140617,"avatar_url":"https://avatars.githubusercontent.com/u/140617?v=3","gravatar_id":"","url":"https://api.github.com/users/jpnurmi","html_url":"https://github.com/jpnurmi","followers_url":"https://api.github.com/users/jpnurmi/followers","following_url":"https://api.github.com/users/jpnurmi/following{/other_user}","gists_url":"https://api.github.com/users/jpnurmi/gists{/gist_id}","starred_url":"https://api.github.com/users/jpnurmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpnurmi/subscriptions","organizations_url":"https://api.github.com/users/jpnurmi/orgs","repos_url":"https://api.github.com/users/jpnurmi/repos","events_url":"https://api.github.com/users/jpnurmi/events{/privacy}","received_events_url":"https://api.github.com/users/jpnurmi/received_events","type":"User","site_admin":false},"repo":{"id":17071649,"name":"znc","full_name":"jpnurmi/znc","owner":{"login":"jpnurmi","id":140617,"avatar_url":"https://avatars.githubusercontent.com/u/140617?v=3","gravatar_id":"","url":"https://api.github.com/users/jpnurmi","html_url":"https://github.com/jpnurmi","followers_url":"https://api.github.com/users/jpnurmi/followers","following_url":"https://api.github.com/users/jpnurmi/following{/other_user}","gists_url":"https://api.github.com/users/jpnurmi/gists{/gist_id}","starred_url":"https://api.github.com/users/jpnurmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpnurmi/subscriptions","organizations_url":"https://api.github.com/users/jpnurmi/orgs","repos_url":"https://api.github.com/users/jpnurmi/repos","events_url":"https://api.github.com/users/jpnurmi/events{/privacy}","received_events_url":"https://api.github.com/users/jpnurmi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jpnurmi/znc","description":"A personal fork for feature development","fork":true,"url":"https://api.github.com/repos/jpnurmi/znc","forks_url":"https://api.github.com/repos/jpnurmi/znc/forks","keys_url":"https://api.github.com/repos/jpnurmi/znc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jpnurmi/znc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jpnurmi/znc/teams","hooks_url":"https://api.github.com/repos/jpnurmi/znc/hooks","issue_events_url":"https://api.github.com/repos/jpnurmi/znc/issues/events{/number}","events_url":"https://api.github.com/repos/jpnurmi/znc/events","assignees_url":"https://api.github.com/repos/jpnurmi/znc/assignees{/user}","branches_url":"https://api.github.com/repos/jpnurmi/znc/branches{/branch}","tags_url":"https://api.github.com/repos/jpnurmi/znc/tags","blobs_url":"https://api.github.com/repos/jpnurmi/znc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jpnurmi/znc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jpnurmi/znc/git/refs{/sha}","trees_url":"https://api.github.com/repos/jpnurmi/znc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jpnurmi/znc/statuses/{sha}","languages_url":"https://api.github.com/repos/jpnurmi/znc/languages","stargazers_url":"https://api.github.com/repos/jpnurmi/znc/stargazers","contributors_url":"https://api.github.com/repos/jpnurmi/znc/contributors","subscribers_url":"https://api.github.com/repos/jpnurmi/znc/subscribers","subscription_url":"https://api.github.com/repos/jpnurmi/znc/subscription","commits_url":"https://api.github.com/repos/jpnurmi/znc/commits{/sha}","git_commits_url":"https://api.github.com/repos/jpnurmi/znc/git/commits{/sha}","comments_url":"https://api.github.com/repos/jpnurmi/znc/comments{/number}","issue_comment_url":"https://api.github.com/repos/jpnurmi/znc/issues/comments{/number}","contents_url":"https://api.github.com/repos/jpnurmi/znc/contents/{+path}","compare_url":"https://api.github.com/repos/jpnurmi/znc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jpnurmi/znc/merges","archive_url":"https://api.github.com/repos/jpnurmi/znc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jpnurmi/znc/downloads","issues_url":"https://api.github.com/repos/jpnurmi/znc/issues{/number}","pulls_url":"https://api.github.com/repos/jpnurmi/znc/pulls{/number}","milestones_url":"https://api.github.com/repos/jpnurmi/znc/milestones{/number}","notifications_url":"https://api.github.com/repos/jpnurmi/znc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jpnurmi/znc/labels{/name}","releases_url":"https://api.github.com/repos/jpnurmi/znc/releases{/id}","created_at":"2014-02-21T22:08:55Z","updated_at":"2015-03-01T13:27:56Z","pushed_at":"2015-03-07T15:27:02Z","git_url":"git://github.com/jpnurmi/znc.git","ssh_url":"git@github.com:jpnurmi/znc.git","clone_url":"https://github.com/jpnurmi/znc.git","svn_url":"https://github.com/jpnurmi/znc","homepage":"http://znc.in/","size":14885,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"znc:master","ref":"master","sha":"0179e857daa0994ac6b2066565f834320f6c05f4","user":{"login":"znc","id":179272,"avatar_url":"https://avatars.githubusercontent.com/u/179272?v=3","gravatar_id":"","url":"https://api.github.com/users/znc","html_url":"https://github.com/znc","followers_url":"https://api.github.com/users/znc/followers","following_url":"https://api.github.com/users/znc/following{/other_user}","gists_url":"https://api.github.com/users/znc/gists{/gist_id}","starred_url":"https://api.github.com/users/znc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/znc/subscriptions","organizations_url":"https://api.github.com/users/znc/orgs","repos_url":"https://api.github.com/users/znc/repos","events_url":"https://api.github.com/users/znc/events{/privacy}","received_events_url":"https://api.github.com/users/znc/received_events","type":"Organization","site_admin":false},"repo":{"id":465681,"name":"znc","full_name":"znc/znc","owner":{"login":"znc","id":179272,"avatar_url":"https://avatars.githubusercontent.com/u/179272?v=3","gravatar_id":"","url":"https://api.github.com/users/znc","html_url":"https://github.com/znc","followers_url":"https://api.github.com/users/znc/followers","following_url":"https://api.github.com/users/znc/following{/other_user}","gists_url":"https://api.github.com/users/znc/gists{/gist_id}","starred_url":"https://api.github.com/users/znc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/znc/subscriptions","organizations_url":"https://api.github.com/users/znc/orgs","repos_url":"https://api.github.com/users/znc/repos","events_url":"https://api.github.com/users/znc/events{/privacy}","received_events_url":"https://api.github.com/users/znc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/znc/znc","description":"Official repository for the ZNC IRC bouncer","fork":false,"url":"https://api.github.com/repos/znc/znc","forks_url":"https://api.github.com/repos/znc/znc/forks","keys_url":"https://api.github.com/repos/znc/znc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/znc/znc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/znc/znc/teams","hooks_url":"https://api.github.com/repos/znc/znc/hooks","issue_events_url":"https://api.github.com/repos/znc/znc/issues/events{/number}","events_url":"https://api.github.com/repos/znc/znc/events","assignees_url":"https://api.github.com/repos/znc/znc/assignees{/user}","branches_url":"https://api.github.com/repos/znc/znc/branches{/branch}","tags_url":"https://api.github.com/repos/znc/znc/tags","blobs_url":"https://api.github.com/repos/znc/znc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/znc/znc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/znc/znc/git/refs{/sha}","trees_url":"https://api.github.com/repos/znc/znc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/znc/znc/statuses/{sha}","languages_url":"https://api.github.com/repos/znc/znc/languages","stargazers_url":"https://api.github.com/repos/znc/znc/stargazers","contributors_url":"https://api.github.com/repos/znc/znc/contributors","subscribers_url":"https://api.github.com/repos/znc/znc/subscribers","subscription_url":"https://api.github.com/repos/znc/znc/subscription","commits_url":"https://api.github.com/repos/znc/znc/commits{/sha}","git_commits_url":"https://api.github.com/repos/znc/znc/git/commits{/sha}","comments_url":"https://api.github.com/repos/znc/znc/comments{/number}","issue_comment_url":"https://api.github.com/repos/znc/znc/issues/comments{/number}","contents_url":"https://api.github.com/repos/znc/znc/contents/{+path}","compare_url":"https://api.github.com/repos/znc/znc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/znc/znc/merges","archive_url":"https://api.github.com/repos/znc/znc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/znc/znc/downloads","issues_url":"https://api.github.com/repos/znc/znc/issues{/number}","pulls_url":"https://api.github.com/repos/znc/znc/pulls{/number}","milestones_url":"https://api.github.com/repos/znc/znc/milestones{/number}","notifications_url":"https://api.github.com/repos/znc/znc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/znc/znc/labels{/name}","releases_url":"https://api.github.com/repos/znc/znc/releases{/id}","created_at":"2010-01-09T23:44:05Z","updated_at":"2015-03-07T15:26:15Z","pushed_at":"2015-03-07T15:26:15Z","git_url":"git://github.com/znc/znc.git","ssh_url":"git@github.com:znc/znc.git","clone_url":"https://github.com/znc/znc.git","svn_url":"https://github.com/znc/znc","homepage":"http://znc.in/","size":18540,"stargazers_count":897,"watchers_count":897,"language":"C++","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":232,"mirror_url":null,"open_issues_count":248,"forks":232,"open_issues":248,"watchers":897,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/znc/znc/pulls/916"},"html":{"href":"https://github.com/znc/znc/pull/916"},"issue":{"href":"https://api.github.com/repos/znc/znc/issues/916"},"comments":{"href":"https://api.github.com/repos/znc/znc/issues/916/comments"},"review_comments":{"href":"https://api.github.com/repos/znc/znc/pulls/916/comments"},"review_comment":{"href":"https://api.github.com/repos/znc/znc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/znc/znc/pulls/916/commits"},"statuses":{"href":"https://api.github.com/repos/znc/znc/statuses/33825439170a3b2762db5d97d9474170d398e3f0"}}}}