{"action":"created","comment":{"url":"https://api.github.com/repos/TTT-2/TTT2/pulls/comments/306830041","pull_request_review_id":266046008,"id":306830041,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwNjgzMDA0MQ==","diff_hunk":"@@ -841,37 +841,40 @@ function TellTraitorsAboutTraitors()\n \t\tend\n \tend\n \n-\thook.Run(\"TTT2TellTraitors\", traitornicks)\n+\tfor _, v in ipairs(player.GetAll()) do\n+\t\tif v:HasTeam(TEAM_TRAITOR) then\n \n-\t-- This is ugly as hell, but it's kinda nice to filter out the names of the\n-\t-- traitors themselves in the messages to them\n-\tlocal traitornicks_min = #traitornicks < 2\n+\t\t\tlocal tmp = table.Copy(traitornicks)\n \n-\tif not traitornicks_min then\n-\t\ttable.sort(traitornicks, function(a, b)\n-\t\t\treturn a and b and a:upper() < b:upper()\n-\t\tend)\n-\tend\n+\t\t\tlocal shouldShow\n \n-\tfor _, v in ipairs(player.GetAll()) do\n-\t\tif v:HasTeam(TEAM_TRAITOR) then\n-\t\t\tif traitornicks_min then\n-\t\t\t\tLANG.Msg(v, \"round_traitors_one\")\n+\t\t\tshouldShow = hook.Run(\"TTT2TellTraitors\", tmp, v)\n+\n+\t\t\tif shouldShow == false or tmp == nil then continue end","path":"gamemodes/terrortown/gamemode/server/sv_main.lua","position":null,"original_position":26,"commit_id":"b8119c88b2a95c9a3a4603c49d4e39dc698233fd","original_commit_id":"9710ac0f9d295fe67853e87800c83d56c27a9145","user":{"login":"TheNickSkater","id":20370962,"node_id":"MDQ6VXNlcjIwMzcwOTYy","avatar_url":"https://avatars3.githubusercontent.com/u/20370962?v=4","gravatar_id":"","url":"https://api.github.com/users/TheNickSkater","html_url":"https://github.com/TheNickSkater","followers_url":"https://api.github.com/users/TheNickSkater/followers","following_url":"https://api.github.com/users/TheNickSkater/following{/other_user}","gists_url":"https://api.github.com/users/TheNickSkater/gists{/gist_id}","starred_url":"https://api.github.com/users/TheNickSkater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheNickSkater/subscriptions","organizations_url":"https://api.github.com/users/TheNickSkater/orgs","repos_url":"https://api.github.com/users/TheNickSkater/repos","events_url":"https://api.github.com/users/TheNickSkater/events{/privacy}","received_events_url":"https://api.github.com/users/TheNickSkater/received_events","type":"User","site_admin":false},"body":"https://github.com/TTT-2/TTT2/pull/361/commits/b8119c88b2a95c9a3a4603c49d4e39dc698233fd\r\nmaybe now","created_at":"2019-07-24T14:08:16Z","updated_at":"2019-07-24T14:08:17Z","html_url":"https://github.com/TTT-2/TTT2/pull/361#discussion_r306830041","pull_request_url":"https://api.github.com/repos/TTT-2/TTT2/pulls/361","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/TTT-2/TTT2/pulls/comments/306830041"},"html":{"href":"https://github.com/TTT-2/TTT2/pull/361#discussion_r306830041"},"pull_request":{"href":"https://api.github.com/repos/TTT-2/TTT2/pulls/361"}},"in_reply_to_id":306812784},"pull_request":{"url":"https://api.github.com/repos/TTT-2/TTT2/pulls/361","id":300509587,"node_id":"MDExOlB1bGxSZXF1ZXN0MzAwNTA5NTg3","html_url":"https://github.com/TTT-2/TTT2/pull/361","diff_url":"https://github.com/TTT-2/TTT2/pull/361.diff","patch_url":"https://github.com/TTT-2/TTT2/pull/361.patch","issue_url":"https://api.github.com/repos/TTT-2/TTT2/issues/361","number":361,"state":"open","locked":false,"title":"Changed TellTraitorsAboutTraitors function","user":{"login":"TheNickSkater","id":20370962,"node_id":"MDQ6VXNlcjIwMzcwOTYy","avatar_url":"https://avatars3.githubusercontent.com/u/20370962?v=4","gravatar_id":"","url":"https://api.github.com/users/TheNickSkater","html_url":"https://github.com/TheNickSkater","followers_url":"https://api.github.com/users/TheNickSkater/followers","following_url":"https://api.github.com/users/TheNickSkater/following{/other_user}","gists_url":"https://api.github.com/users/TheNickSkater/gists{/gist_id}","starred_url":"https://api.github.com/users/TheNickSkater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheNickSkater/subscriptions","organizations_url":"https://api.github.com/users/TheNickSkater/orgs","repos_url":"https://api.github.com/users/TheNickSkater/repos","events_url":"https://api.github.com/users/TheNickSkater/events{/privacy}","received_events_url":"https://api.github.com/users/TheNickSkater/received_events","type":"User","site_admin":false},"body":"You can now decide (with a hook) if the Message should even be shown for certain players and what players should be shown.\r\n\r\nFirst of all this brings more possibilities into the game (for me for my BodyGuard :) ) and I think it's better if the hook is changeable PER player, and not only for all at once.\r\n\r\nPlease look over it and tell me what needs to be changed for you to accept it.\r\n\r\nOh, also the Spy needs to be updated if you accept this (I may do it if needed)","created_at":"2019-07-23T23:40:22Z","updated_at":"2019-07-24T14:08:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"832697c79ecd7b6c64f8e5814dd72c3211a043ae","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/TTT-2/TTT2/pulls/361/commits","review_comments_url":"https://api.github.com/repos/TTT-2/TTT2/pulls/361/comments","review_comment_url":"https://api.github.com/repos/TTT-2/TTT2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TTT-2/TTT2/issues/361/comments","statuses_url":"https://api.github.com/repos/TTT-2/TTT2/statuses/b8119c88b2a95c9a3a4603c49d4e39dc698233fd","head":{"label":"TheNickSkater:master","ref":"master","sha":"b8119c88b2a95c9a3a4603c49d4e39dc698233fd","user":{"login":"TheNickSkater","id":20370962,"node_id":"MDQ6VXNlcjIwMzcwOTYy","avatar_url":"https://avatars3.githubusercontent.com/u/20370962?v=4","gravatar_id":"","url":"https://api.github.com/users/TheNickSkater","html_url":"https://github.com/TheNickSkater","followers_url":"https://api.github.com/users/TheNickSkater/followers","following_url":"https://api.github.com/users/TheNickSkater/following{/other_user}","gists_url":"https://api.github.com/users/TheNickSkater/gists{/gist_id}","starred_url":"https://api.github.com/users/TheNickSkater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheNickSkater/subscriptions","organizations_url":"https://api.github.com/users/TheNickSkater/orgs","repos_url":"https://api.github.com/users/TheNickSkater/repos","events_url":"https://api.github.com/users/TheNickSkater/events{/privacy}","received_events_url":"https://api.github.com/users/TheNickSkater/received_events","type":"User","site_admin":false},"repo":{"id":189491487,"node_id":"MDEwOlJlcG9zaXRvcnkxODk0OTE0ODc=","name":"TTT2","full_name":"TheNickSkater/TTT2","private":false,"owner":{"login":"TheNickSkater","id":20370962,"node_id":"MDQ6VXNlcjIwMzcwOTYy","avatar_url":"https://avatars3.githubusercontent.com/u/20370962?v=4","gravatar_id":"","url":"https://api.github.com/users/TheNickSkater","html_url":"https://github.com/TheNickSkater","followers_url":"https://api.github.com/users/TheNickSkater/followers","following_url":"https://api.github.com/users/TheNickSkater/following{/other_user}","gists_url":"https://api.github.com/users/TheNickSkater/gists{/gist_id}","starred_url":"https://api.github.com/users/TheNickSkater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheNickSkater/subscriptions","organizations_url":"https://api.github.com/users/TheNickSkater/orgs","repos_url":"https://api.github.com/users/TheNickSkater/repos","events_url":"https://api.github.com/users/TheNickSkater/events{/privacy}","received_events_url":"https://api.github.com/users/TheNickSkater/received_events","type":"User","site_admin":false},"html_url":"https://github.com/TheNickSkater/TTT2","description":"This is [TTT2] Trouble in Terrorist Town 2 (Advanced Update)","fork":true,"url":"https://api.github.com/repos/TheNickSkater/TTT2","forks_url":"https://api.github.com/repos/TheNickSkater/TTT2/forks","keys_url":"https://api.github.com/repos/TheNickSkater/TTT2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TheNickSkater/TTT2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TheNickSkater/TTT2/teams","hooks_url":"https://api.github.com/repos/TheNickSkater/TTT2/hooks","issue_events_url":"https://api.github.com/repos/TheNickSkater/TTT2/issues/events{/number}","events_url":"https://api.github.com/repos/TheNickSkater/TTT2/events","assignees_url":"https://api.github.com/repos/TheNickSkater/TTT2/assignees{/user}","branches_url":"https://api.github.com/repos/TheNickSkater/TTT2/branches{/branch}","tags_url":"https://api.github.com/repos/TheNickSkater/TTT2/tags","blobs_url":"https://api.github.com/repos/TheNickSkater/TTT2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TheNickSkater/TTT2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TheNickSkater/TTT2/git/refs{/sha}","trees_url":"https://api.github.com/repos/TheNickSkater/TTT2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TheNickSkater/TTT2/statuses/{sha}","languages_url":"https://api.github.com/repos/TheNickSkater/TTT2/languages","stargazers_url":"https://api.github.com/repos/TheNickSkater/TTT2/stargazers","contributors_url":"https://api.github.com/repos/TheNickSkater/TTT2/contributors","subscribers_url":"https://api.github.com/repos/TheNickSkater/TTT2/subscribers","subscription_url":"https://api.github.com/repos/TheNickSkater/TTT2/subscription","commits_url":"https://api.github.com/repos/TheNickSkater/TTT2/commits{/sha}","git_commits_url":"https://api.github.com/repos/TheNickSkater/TTT2/git/commits{/sha}","comments_url":"https://api.github.com/repos/TheNickSkater/TTT2/comments{/number}","issue_comment_url":"https://api.github.com/repos/TheNickSkater/TTT2/issues/comments{/number}","contents_url":"https://api.github.com/repos/TheNickSkater/TTT2/contents/{+path}","compare_url":"https://api.github.com/repos/TheNickSkater/TTT2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TheNickSkater/TTT2/merges","archive_url":"https://api.github.com/repos/TheNickSkater/TTT2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TheNickSkater/TTT2/downloads","issues_url":"https://api.github.com/repos/TheNickSkater/TTT2/issues{/number}","pulls_url":"https://api.github.com/repos/TheNickSkater/TTT2/pulls{/number}","milestones_url":"https://api.github.com/repos/TheNickSkater/TTT2/milestones{/number}","notifications_url":"https://api.github.com/repos/TheNickSkater/TTT2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TheNickSkater/TTT2/labels{/name}","releases_url":"https://api.github.com/repos/TheNickSkater/TTT2/releases{/id}","deployments_url":"https://api.github.com/repos/TheNickSkater/TTT2/deployments","created_at":"2019-05-30T22:38:35Z","updated_at":"2019-07-24T14:07:15Z","pushed_at":"2019-07-24T14:07:13Z","git_url":"git://github.com/TheNickSkater/TTT2.git","ssh_url":"git@github.com:TheNickSkater/TTT2.git","clone_url":"https://github.com/TheNickSkater/TTT2.git","svn_url":"https://github.com/TheNickSkater/TTT2","homepage":"http://ttt2.informaskill.de/","size":3595,"stargazers_count":0,"watchers_count":0,"language":"Lua","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"TTT-2:master","ref":"master","sha":"7661a59ebdda5178cf57ded89b6597404069451c","user":{"login":"TTT-2","id":44879410,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0ODc5NDEw","avatar_url":"https://avatars1.githubusercontent.com/u/44879410?v=4","gravatar_id":"","url":"https://api.github.com/users/TTT-2","html_url":"https://github.com/TTT-2","followers_url":"https://api.github.com/users/TTT-2/followers","following_url":"https://api.github.com/users/TTT-2/following{/other_user}","gists_url":"https://api.github.com/users/TTT-2/gists{/gist_id}","starred_url":"https://api.github.com/users/TTT-2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TTT-2/subscriptions","organizations_url":"https://api.github.com/users/TTT-2/orgs","repos_url":"https://api.github.com/users/TTT-2/repos","events_url":"https://api.github.com/users/TTT-2/events{/privacy}","received_events_url":"https://api.github.com/users/TTT-2/received_events","type":"Organization","site_admin":false},"repo":{"id":128816763,"node_id":"MDEwOlJlcG9zaXRvcnkxMjg4MTY3NjM=","name":"TTT2","full_name":"TTT-2/TTT2","private":false,"owner":{"login":"TTT-2","id":44879410,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0ODc5NDEw","avatar_url":"https://avatars1.githubusercontent.com/u/44879410?v=4","gravatar_id":"","url":"https://api.github.com/users/TTT-2","html_url":"https://github.com/TTT-2","followers_url":"https://api.github.com/users/TTT-2/followers","following_url":"https://api.github.com/users/TTT-2/following{/other_user}","gists_url":"https://api.github.com/users/TTT-2/gists{/gist_id}","starred_url":"https://api.github.com/users/TTT-2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TTT-2/subscriptions","organizations_url":"https://api.github.com/users/TTT-2/orgs","repos_url":"https://api.github.com/users/TTT-2/repos","events_url":"https://api.github.com/users/TTT-2/events{/privacy}","received_events_url":"https://api.github.com/users/TTT-2/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/TTT-2/TTT2","description":"This is [TTT2] Trouble in Terrorist Town 2 (Advanced Update)","fork":false,"url":"https://api.github.com/repos/TTT-2/TTT2","forks_url":"https://api.github.com/repos/TTT-2/TTT2/forks","keys_url":"https://api.github.com/repos/TTT-2/TTT2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TTT-2/TTT2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TTT-2/TTT2/teams","hooks_url":"https://api.github.com/repos/TTT-2/TTT2/hooks","issue_events_url":"https://api.github.com/repos/TTT-2/TTT2/issues/events{/number}","events_url":"https://api.github.com/repos/TTT-2/TTT2/events","assignees_url":"https://api.github.com/repos/TTT-2/TTT2/assignees{/user}","branches_url":"https://api.github.com/repos/TTT-2/TTT2/branches{/branch}","tags_url":"https://api.github.com/repos/TTT-2/TTT2/tags","blobs_url":"https://api.github.com/repos/TTT-2/TTT2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TTT-2/TTT2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TTT-2/TTT2/git/refs{/sha}","trees_url":"https://api.github.com/repos/TTT-2/TTT2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TTT-2/TTT2/statuses/{sha}","languages_url":"https://api.github.com/repos/TTT-2/TTT2/languages","stargazers_url":"https://api.github.com/repos/TTT-2/TTT2/stargazers","contributors_url":"https://api.github.com/repos/TTT-2/TTT2/contributors","subscribers_url":"https://api.github.com/repos/TTT-2/TTT2/subscribers","subscription_url":"https://api.github.com/repos/TTT-2/TTT2/subscription","commits_url":"https://api.github.com/repos/TTT-2/TTT2/commits{/sha}","git_commits_url":"https://api.github.com/repos/TTT-2/TTT2/git/commits{/sha}","comments_url":"https://api.github.com/repos/TTT-2/TTT2/comments{/number}","issue_comment_url":"https://api.github.com/repos/TTT-2/TTT2/issues/comments{/number}","contents_url":"https://api.github.com/repos/TTT-2/TTT2/contents/{+path}","compare_url":"https://api.github.com/repos/TTT-2/TTT2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TTT-2/TTT2/merges","archive_url":"https://api.github.com/repos/TTT-2/TTT2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TTT-2/TTT2/downloads","issues_url":"https://api.github.com/repos/TTT-2/TTT2/issues{/number}","pulls_url":"https://api.github.com/repos/TTT-2/TTT2/pulls{/number}","milestones_url":"https://api.github.com/repos/TTT-2/TTT2/milestones{/number}","notifications_url":"https://api.github.com/repos/TTT-2/TTT2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TTT-2/TTT2/labels{/name}","releases_url":"https://api.github.com/repos/TTT-2/TTT2/releases{/id}","deployments_url":"https://api.github.com/repos/TTT-2/TTT2/deployments","created_at":"2018-04-09T18:30:37Z","updated_at":"2019-07-24T11:13:39Z","pushed_at":"2019-07-24T14:07:15Z","git_url":"git://github.com/TTT-2/TTT2.git","ssh_url":"git@github.com:TTT-2/TTT2.git","clone_url":"https://github.com/TTT-2/TTT2.git","svn_url":"https://github.com/TTT-2/TTT2","homepage":"http://ttt2.informaskill.de/","size":4000,"stargazers_count":35,"watchers_count":35,"language":"Lua","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":16,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":43,"license":null,"forks":16,"open_issues":43,"watchers":35,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TTT-2/TTT2/pulls/361"},"html":{"href":"https://github.com/TTT-2/TTT2/pull/361"},"issue":{"href":"https://api.github.com/repos/TTT-2/TTT2/issues/361"},"comments":{"href":"https://api.github.com/repos/TTT-2/TTT2/issues/361/comments"},"review_comments":{"href":"https://api.github.com/repos/TTT-2/TTT2/pulls/361/comments"},"review_comment":{"href":"https://api.github.com/repos/TTT-2/TTT2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TTT-2/TTT2/pulls/361/commits"},"statuses":{"href":"https://api.github.com/repos/TTT-2/TTT2/statuses/b8119c88b2a95c9a3a4603c49d4e39dc698233fd"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"TheNickSkater"}}