{"action":"created","comment":{"url":"https://api.github.com/repos/thelounge/lounge/pulls/comments/55645077","id":55645077,"diff_hunk":"@@ -268,18 +268,24 @@ Client.prototype.setPassword = function(hash) {\n \n Client.prototype.input = function(data) {\n \tvar client = this;\n-\tvar text = data.text.trim();\n+\tvar text = data.text.replace(/\\s+$/, \"\");\n \tvar target = client.find(data.target);\n-\tif (text.charAt(0) !== \"/\") {\n-\t\ttext = \"/say \" + text;\n+\n+\t// This is either a normal message or a command escaped with a leading '/'\n+\tif (text.charAt(0) !== \"/\" || text.charAt(1) === \"/\") {\n+\t\ttext = \"say \" + text.replace(/^\\//, \"\");\n+\t} else {\n+\t\ttext = text.substr(1);\n \t}\n+\n \tvar args = text.split(\" \");","path":"src/client.js","position":40,"original_position":43,"commit_id":"842b8d620caa8320589370864a0af35cce941e7e","original_commit_id":"6b22ab5776a7d7592c3a239ec6bb654ecc48a619","user":{"login":"xPaw","id":613331,"avatar_url":"https://avatars.githubusercontent.com/u/613331?v=3","gravatar_id":"","url":"https://api.github.com/users/xPaw","html_url":"https://github.com/xPaw","followers_url":"https://api.github.com/users/xPaw/followers","following_url":"https://api.github.com/users/xPaw/following{/other_user}","gists_url":"https://api.github.com/users/xPaw/gists{/gist_id}","starred_url":"https://api.github.com/users/xPaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xPaw/subscriptions","organizations_url":"https://api.github.com/users/xPaw/orgs","repos_url":"https://api.github.com/users/xPaw/repos","events_url":"https://api.github.com/users/xPaw/events{/privacy}","received_events_url":"https://api.github.com/users/xPaw/received_events","type":"User","site_admin":false},"body":"I've reverted the trim change, it will have to go into the next overhaul.","created_at":"2016-03-10T08:08:08Z","updated_at":"2016-03-10T08:08:08Z","html_url":"https://github.com/thelounge/lounge/pull/154#discussion_r55645077","pull_request_url":"https://api.github.com/repos/thelounge/lounge/pulls/154","_links":{"self":{"href":"https://api.github.com/repos/thelounge/lounge/pulls/comments/55645077"},"html":{"href":"https://github.com/thelounge/lounge/pull/154#discussion_r55645077"},"pull_request":{"href":"https://api.github.com/repos/thelounge/lounge/pulls/154"}}},"pull_request":{"url":"https://api.github.com/repos/thelounge/lounge/pulls/154","id":61838497,"html_url":"https://github.com/thelounge/lounge/pull/154","diff_url":"https://github.com/thelounge/lounge/pull/154.diff","patch_url":"https://github.com/thelounge/lounge/pull/154.patch","issue_url":"https://api.github.com/repos/thelounge/lounge/issues/154","number":154,"state":"open","locked":false,"title":"Handle commands in a better way","user":{"login":"xPaw","id":613331,"avatar_url":"https://avatars.githubusercontent.com/u/613331?v=3","gravatar_id":"","url":"https://api.github.com/users/xPaw","html_url":"https://github.com/xPaw","followers_url":"https://api.github.com/users/xPaw/followers","following_url":"https://api.github.com/users/xPaw/following{/other_user}","gists_url":"https://api.github.com/users/xPaw/gists{/gist_id}","starred_url":"https://api.github.com/users/xPaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xPaw/subscriptions","organizations_url":"https://api.github.com/users/xPaw/orgs","repos_url":"https://api.github.com/users/xPaw/repos","events_url":"https://api.github.com/users/xPaw/events{/privacy}","received_events_url":"https://api.github.com/users/xPaw/received_events","type":"User","site_admin":false},"body":"- Minor performance boost as commands stop processing as soon as one command is processed, `msg` as the first command, and any time you send a message, it won't try to execute any other command\r\n- Removed `/ns`, `/cs`, `/hs` aliases, handled properly by the server now, fixes #153\r\n- All unknown commands are always sent to the server\r\n- Allows sending messages starting with `/` by escaping it as `//` (or more slashes)","created_at":"2016-03-06T09:39:43Z","updated_at":"2016-03-10T08:08:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fadbfc0a2862eb860fbfb72ca894bed9166b914e","assignee":{"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},"milestone":null,"commits_url":"https://api.github.com/repos/thelounge/lounge/pulls/154/commits","review_comments_url":"https://api.github.com/repos/thelounge/lounge/pulls/154/comments","review_comment_url":"https://api.github.com/repos/thelounge/lounge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thelounge/lounge/issues/154/comments","statuses_url":"https://api.github.com/repos/thelounge/lounge/statuses/842b8d620caa8320589370864a0af35cce941e7e","head":{"label":"xPaw:better-commands","ref":"better-commands","sha":"842b8d620caa8320589370864a0af35cce941e7e","user":{"login":"xPaw","id":613331,"avatar_url":"https://avatars.githubusercontent.com/u/613331?v=3","gravatar_id":"","url":"https://api.github.com/users/xPaw","html_url":"https://github.com/xPaw","followers_url":"https://api.github.com/users/xPaw/followers","following_url":"https://api.github.com/users/xPaw/following{/other_user}","gists_url":"https://api.github.com/users/xPaw/gists{/gist_id}","starred_url":"https://api.github.com/users/xPaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xPaw/subscriptions","organizations_url":"https://api.github.com/users/xPaw/orgs","repos_url":"https://api.github.com/users/xPaw/repos","events_url":"https://api.github.com/users/xPaw/events{/privacy}","received_events_url":"https://api.github.com/users/xPaw/received_events","type":"User","site_admin":false},"repo":{"id":51387559,"name":"lounge","full_name":"xPaw/lounge","owner":{"login":"xPaw","id":613331,"avatar_url":"https://avatars.githubusercontent.com/u/613331?v=3","gravatar_id":"","url":"https://api.github.com/users/xPaw","html_url":"https://github.com/xPaw","followers_url":"https://api.github.com/users/xPaw/followers","following_url":"https://api.github.com/users/xPaw/following{/other_user}","gists_url":"https://api.github.com/users/xPaw/gists{/gist_id}","starred_url":"https://api.github.com/users/xPaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xPaw/subscriptions","organizations_url":"https://api.github.com/users/xPaw/orgs","repos_url":"https://api.github.com/users/xPaw/repos","events_url":"https://api.github.com/users/xPaw/events{/privacy}","received_events_url":"https://api.github.com/users/xPaw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xPaw/lounge","description":"","fork":true,"url":"https://api.github.com/repos/xPaw/lounge","forks_url":"https://api.github.com/repos/xPaw/lounge/forks","keys_url":"https://api.github.com/repos/xPaw/lounge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xPaw/lounge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xPaw/lounge/teams","hooks_url":"https://api.github.com/repos/xPaw/lounge/hooks","issue_events_url":"https://api.github.com/repos/xPaw/lounge/issues/events{/number}","events_url":"https://api.github.com/repos/xPaw/lounge/events","assignees_url":"https://api.github.com/repos/xPaw/lounge/assignees{/user}","branches_url":"https://api.github.com/repos/xPaw/lounge/branches{/branch}","tags_url":"https://api.github.com/repos/xPaw/lounge/tags","blobs_url":"https://api.github.com/repos/xPaw/lounge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xPaw/lounge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xPaw/lounge/git/refs{/sha}","trees_url":"https://api.github.com/repos/xPaw/lounge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xPaw/lounge/statuses/{sha}","languages_url":"https://api.github.com/repos/xPaw/lounge/languages","stargazers_url":"https://api.github.com/repos/xPaw/lounge/stargazers","contributors_url":"https://api.github.com/repos/xPaw/lounge/contributors","subscribers_url":"https://api.github.com/repos/xPaw/lounge/subscribers","subscription_url":"https://api.github.com/repos/xPaw/lounge/subscription","commits_url":"https://api.github.com/repos/xPaw/lounge/commits{/sha}","git_commits_url":"https://api.github.com/repos/xPaw/lounge/git/commits{/sha}","comments_url":"https://api.github.com/repos/xPaw/lounge/comments{/number}","issue_comment_url":"https://api.github.com/repos/xPaw/lounge/issues/comments{/number}","contents_url":"https://api.github.com/repos/xPaw/lounge/contents/{+path}","compare_url":"https://api.github.com/repos/xPaw/lounge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xPaw/lounge/merges","archive_url":"https://api.github.com/repos/xPaw/lounge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xPaw/lounge/downloads","issues_url":"https://api.github.com/repos/xPaw/lounge/issues{/number}","pulls_url":"https://api.github.com/repos/xPaw/lounge/pulls{/number}","milestones_url":"https://api.github.com/repos/xPaw/lounge/milestones{/number}","notifications_url":"https://api.github.com/repos/xPaw/lounge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xPaw/lounge/labels{/name}","releases_url":"https://api.github.com/repos/xPaw/lounge/releases{/id}","deployments_url":"https://api.github.com/repos/xPaw/lounge/deployments","created_at":"2016-02-09T18:11:53Z","updated_at":"2016-02-09T18:11:53Z","pushed_at":"2016-03-10T08:06:30Z","git_url":"git://github.com/xPaw/lounge.git","ssh_url":"git@github.com:xPaw/lounge.git","clone_url":"https://github.com/xPaw/lounge.git","svn_url":"https://github.com/xPaw/lounge","homepage":"https://thelounge.github.io","size":4788,"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":"f577da52a39d118c9f6256101a7cd3828dcfc67d","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-03-08T22:01:33Z","pushed_at":"2016-03-10T08:06:31Z","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":5915,"stargazers_count":79,"watchers_count":79,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":62,"forks":19,"open_issues":62,"watchers":79,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thelounge/lounge/pulls/154"},"html":{"href":"https://github.com/thelounge/lounge/pull/154"},"issue":{"href":"https://api.github.com/repos/thelounge/lounge/issues/154"},"comments":{"href":"https://api.github.com/repos/thelounge/lounge/issues/154/comments"},"review_comments":{"href":"https://api.github.com/repos/thelounge/lounge/pulls/154/comments"},"review_comment":{"href":"https://api.github.com/repos/thelounge/lounge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thelounge/lounge/pulls/154/commits"},"statuses":{"href":"https://api.github.com/repos/thelounge/lounge/statuses/842b8d620caa8320589370864a0af35cce941e7e"}}}}