{"action":"created","comment":{"url":"https://api.github.com/repos/mormaer/XSearcher/pulls/comments/139122976","pull_request_review_id":63009231,"id":139122976,"diff_hunk":"@@ -0,0 +1,283 @@\n+package com.mormaer.xdcc\n+\n+import android.app.NotificationManager\n+import android.content.Context\n+import android.content.Intent\n+import android.os.Environment\n+import android.support.v4.app.NotificationCompat\n+import android.util.Log\n+import java.io.*\n+import java.net.*\n+\n+/**\n+ * Created by mormaer on 8/28/17.\n+ * TODO: Passive connections are almost there, don't receive connection to ServerSocket (needs bound??)\n+ * TODO: handle ipv6 strings...\n+ * TODO: separate the code that reads from socket (duplicated in active/passive download sections)\n+ */\n+\n+class MORDccReceiver(private val fileName: String,\n+                     inLongIp: String,\n+                     private val port: Int,\n+                     private val fileSize: Long,\n+                     private val context: Context,\n+                     private val localIP: String?,\n+                     private val token: String,\n+                     private val output: BufferedWriter,\n+                     private val user: String) {\n+\n+    private val TAG = \"MORDccReceiver\"\n+\n+    private val BUFFERSIZE = 1024\n+\n+    private var ip: String?\n+    private var socket: Socket?\n+\n+    init {\n+        ip = convertLongToIp(inLongIp)","path":"app/src/main/java/com/mormaer/xdcc/MORDccReceiver.kt","position":37,"original_position":37,"commit_id":"0876d35acc153951ecee44584e06b553c6386f55","original_commit_id":"0876d35acc153951ecee44584e06b553c6386f55","user":{"login":"mormaer","id":5231793,"avatar_url":"https://avatars1.githubusercontent.com/u/5231793?v=4","gravatar_id":"","url":"https://api.github.com/users/mormaer","html_url":"https://github.com/mormaer","followers_url":"https://api.github.com/users/mormaer/followers","following_url":"https://api.github.com/users/mormaer/following{/other_user}","gists_url":"https://api.github.com/users/mormaer/gists{/gist_id}","starred_url":"https://api.github.com/users/mormaer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mormaer/subscriptions","organizations_url":"https://api.github.com/users/mormaer/orgs","repos_url":"https://api.github.com/users/mormaer/repos","events_url":"https://api.github.com/users/mormaer/events{/privacy}","received_events_url":"https://api.github.com/users/mormaer/received_events","type":"User","site_admin":false},"body":"This doesn't need to be an instance variable...","created_at":"2017-09-15T11:10:45Z","updated_at":"2017-09-15T11:14:29Z","html_url":"https://github.com/mormaer/XSearcher/pull/20#discussion_r139122976","pull_request_url":"https://api.github.com/repos/mormaer/XSearcher/pulls/20","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/mormaer/XSearcher/pulls/comments/139122976"},"html":{"href":"https://github.com/mormaer/XSearcher/pull/20#discussion_r139122976"},"pull_request":{"href":"https://api.github.com/repos/mormaer/XSearcher/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/mormaer/XSearcher/pulls/20","id":140753652,"html_url":"https://github.com/mormaer/XSearcher/pull/20","diff_url":"https://github.com/mormaer/XSearcher/pull/20.diff","patch_url":"https://github.com/mormaer/XSearcher/pull/20.patch","issue_url":"https://api.github.com/repos/mormaer/XSearcher/issues/20","number":20,"state":"open","locked":false,"title":"IRC Connection and File Download","user":{"login":"mormaer","id":5231793,"avatar_url":"https://avatars1.githubusercontent.com/u/5231793?v=4","gravatar_id":"","url":"https://api.github.com/users/mormaer","html_url":"https://github.com/mormaer","followers_url":"https://api.github.com/users/mormaer/followers","following_url":"https://api.github.com/users/mormaer/following{/other_user}","gists_url":"https://api.github.com/users/mormaer/gists{/gist_id}","starred_url":"https://api.github.com/users/mormaer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mormaer/subscriptions","organizations_url":"https://api.github.com/users/mormaer/orgs","repos_url":"https://api.github.com/users/mormaer/repos","events_url":"https://api.github.com/users/mormaer/events{/privacy}","received_events_url":"https://api.github.com/users/mormaer/received_events","type":"User","site_admin":false},"body":"Created an on-going service which will connect to the specified IRC server and issue the required commands to request the download. Downloads of active type are working correctly, however passive fails at the final step - I think the issue is the ServerSocket not listening correctly...","created_at":"2017-09-13T07:35:24Z","updated_at":"2017-09-15T11:14:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9da5c8a5e015feb0f24e840d5f9fb34f0672988","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/mormaer/XSearcher/pulls/20/commits","review_comments_url":"https://api.github.com/repos/mormaer/XSearcher/pulls/20/comments","review_comment_url":"https://api.github.com/repos/mormaer/XSearcher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mormaer/XSearcher/issues/20/comments","statuses_url":"https://api.github.com/repos/mormaer/XSearcher/statuses/0876d35acc153951ecee44584e06b553c6386f55","head":{"label":"mormaer:irc_connection","ref":"irc_connection","sha":"0876d35acc153951ecee44584e06b553c6386f55","user":{"login":"mormaer","id":5231793,"avatar_url":"https://avatars1.githubusercontent.com/u/5231793?v=4","gravatar_id":"","url":"https://api.github.com/users/mormaer","html_url":"https://github.com/mormaer","followers_url":"https://api.github.com/users/mormaer/followers","following_url":"https://api.github.com/users/mormaer/following{/other_user}","gists_url":"https://api.github.com/users/mormaer/gists{/gist_id}","starred_url":"https://api.github.com/users/mormaer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mormaer/subscriptions","organizations_url":"https://api.github.com/users/mormaer/orgs","repos_url":"https://api.github.com/users/mormaer/repos","events_url":"https://api.github.com/users/mormaer/events{/privacy}","received_events_url":"https://api.github.com/users/mormaer/received_events","type":"User","site_admin":false},"repo":{"id":52996960,"name":"XSearcher","full_name":"mormaer/XSearcher","owner":{"login":"mormaer","id":5231793,"avatar_url":"https://avatars1.githubusercontent.com/u/5231793?v=4","gravatar_id":"","url":"https://api.github.com/users/mormaer","html_url":"https://github.com/mormaer","followers_url":"https://api.github.com/users/mormaer/followers","following_url":"https://api.github.com/users/mormaer/following{/other_user}","gists_url":"https://api.github.com/users/mormaer/gists{/gist_id}","starred_url":"https://api.github.com/users/mormaer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mormaer/subscriptions","organizations_url":"https://api.github.com/users/mormaer/orgs","repos_url":"https://api.github.com/users/mormaer/repos","events_url":"https://api.github.com/users/mormaer/events{/privacy}","received_events_url":"https://api.github.com/users/mormaer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mormaer/XSearcher","description":"Android UI for IXirc API","fork":false,"url":"https://api.github.com/repos/mormaer/XSearcher","forks_url":"https://api.github.com/repos/mormaer/XSearcher/forks","keys_url":"https://api.github.com/repos/mormaer/XSearcher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mormaer/XSearcher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mormaer/XSearcher/teams","hooks_url":"https://api.github.com/repos/mormaer/XSearcher/hooks","issue_events_url":"https://api.github.com/repos/mormaer/XSearcher/issues/events{/number}","events_url":"https://api.github.com/repos/mormaer/XSearcher/events","assignees_url":"https://api.github.com/repos/mormaer/XSearcher/assignees{/user}","branches_url":"https://api.github.com/repos/mormaer/XSearcher/branches{/branch}","tags_url":"https://api.github.com/repos/mormaer/XSearcher/tags","blobs_url":"https://api.github.com/repos/mormaer/XSearcher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mormaer/XSearcher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mormaer/XSearcher/git/refs{/sha}","trees_url":"https://api.github.com/repos/mormaer/XSearcher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mormaer/XSearcher/statuses/{sha}","languages_url":"https://api.github.com/repos/mormaer/XSearcher/languages","stargazers_url":"https://api.github.com/repos/mormaer/XSearcher/stargazers","contributors_url":"https://api.github.com/repos/mormaer/XSearcher/contributors","subscribers_url":"https://api.github.com/repos/mormaer/XSearcher/subscribers","subscription_url":"https://api.github.com/repos/mormaer/XSearcher/subscription","commits_url":"https://api.github.com/repos/mormaer/XSearcher/commits{/sha}","git_commits_url":"https://api.github.com/repos/mormaer/XSearcher/git/commits{/sha}","comments_url":"https://api.github.com/repos/mormaer/XSearcher/comments{/number}","issue_comment_url":"https://api.github.com/repos/mormaer/XSearcher/issues/comments{/number}","contents_url":"https://api.github.com/repos/mormaer/XSearcher/contents/{+path}","compare_url":"https://api.github.com/repos/mormaer/XSearcher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mormaer/XSearcher/merges","archive_url":"https://api.github.com/repos/mormaer/XSearcher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mormaer/XSearcher/downloads","issues_url":"https://api.github.com/repos/mormaer/XSearcher/issues{/number}","pulls_url":"https://api.github.com/repos/mormaer/XSearcher/pulls{/number}","milestones_url":"https://api.github.com/repos/mormaer/XSearcher/milestones{/number}","notifications_url":"https://api.github.com/repos/mormaer/XSearcher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mormaer/XSearcher/labels{/name}","releases_url":"https://api.github.com/repos/mormaer/XSearcher/releases{/id}","deployments_url":"https://api.github.com/repos/mormaer/XSearcher/deployments","created_at":"2016-03-02T21:14:30Z","updated_at":"2016-10-23T20:04:32Z","pushed_at":"2017-09-14T21:18:14Z","git_url":"git://github.com/mormaer/XSearcher.git","ssh_url":"git@github.com:mormaer/XSearcher.git","clone_url":"https://github.com/mormaer/XSearcher.git","svn_url":"https://github.com/mormaer/XSearcher","homepage":"","size":411,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"mormaer:master","ref":"master","sha":"fbe007ad637d685df92ad870b1ee09ac35a1ed8c","user":{"login":"mormaer","id":5231793,"avatar_url":"https://avatars1.githubusercontent.com/u/5231793?v=4","gravatar_id":"","url":"https://api.github.com/users/mormaer","html_url":"https://github.com/mormaer","followers_url":"https://api.github.com/users/mormaer/followers","following_url":"https://api.github.com/users/mormaer/following{/other_user}","gists_url":"https://api.github.com/users/mormaer/gists{/gist_id}","starred_url":"https://api.github.com/users/mormaer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mormaer/subscriptions","organizations_url":"https://api.github.com/users/mormaer/orgs","repos_url":"https://api.github.com/users/mormaer/repos","events_url":"https://api.github.com/users/mormaer/events{/privacy}","received_events_url":"https://api.github.com/users/mormaer/received_events","type":"User","site_admin":false},"repo":{"id":52996960,"name":"XSearcher","full_name":"mormaer/XSearcher","owner":{"login":"mormaer","id":5231793,"avatar_url":"https://avatars1.githubusercontent.com/u/5231793?v=4","gravatar_id":"","url":"https://api.github.com/users/mormaer","html_url":"https://github.com/mormaer","followers_url":"https://api.github.com/users/mormaer/followers","following_url":"https://api.github.com/users/mormaer/following{/other_user}","gists_url":"https://api.github.com/users/mormaer/gists{/gist_id}","starred_url":"https://api.github.com/users/mormaer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mormaer/subscriptions","organizations_url":"https://api.github.com/users/mormaer/orgs","repos_url":"https://api.github.com/users/mormaer/repos","events_url":"https://api.github.com/users/mormaer/events{/privacy}","received_events_url":"https://api.github.com/users/mormaer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mormaer/XSearcher","description":"Android UI for IXirc API","fork":false,"url":"https://api.github.com/repos/mormaer/XSearcher","forks_url":"https://api.github.com/repos/mormaer/XSearcher/forks","keys_url":"https://api.github.com/repos/mormaer/XSearcher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mormaer/XSearcher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mormaer/XSearcher/teams","hooks_url":"https://api.github.com/repos/mormaer/XSearcher/hooks","issue_events_url":"https://api.github.com/repos/mormaer/XSearcher/issues/events{/number}","events_url":"https://api.github.com/repos/mormaer/XSearcher/events","assignees_url":"https://api.github.com/repos/mormaer/XSearcher/assignees{/user}","branches_url":"https://api.github.com/repos/mormaer/XSearcher/branches{/branch}","tags_url":"https://api.github.com/repos/mormaer/XSearcher/tags","blobs_url":"https://api.github.com/repos/mormaer/XSearcher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mormaer/XSearcher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mormaer/XSearcher/git/refs{/sha}","trees_url":"https://api.github.com/repos/mormaer/XSearcher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mormaer/XSearcher/statuses/{sha}","languages_url":"https://api.github.com/repos/mormaer/XSearcher/languages","stargazers_url":"https://api.github.com/repos/mormaer/XSearcher/stargazers","contributors_url":"https://api.github.com/repos/mormaer/XSearcher/contributors","subscribers_url":"https://api.github.com/repos/mormaer/XSearcher/subscribers","subscription_url":"https://api.github.com/repos/mormaer/XSearcher/subscription","commits_url":"https://api.github.com/repos/mormaer/XSearcher/commits{/sha}","git_commits_url":"https://api.github.com/repos/mormaer/XSearcher/git/commits{/sha}","comments_url":"https://api.github.com/repos/mormaer/XSearcher/comments{/number}","issue_comment_url":"https://api.github.com/repos/mormaer/XSearcher/issues/comments{/number}","contents_url":"https://api.github.com/repos/mormaer/XSearcher/contents/{+path}","compare_url":"https://api.github.com/repos/mormaer/XSearcher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mormaer/XSearcher/merges","archive_url":"https://api.github.com/repos/mormaer/XSearcher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mormaer/XSearcher/downloads","issues_url":"https://api.github.com/repos/mormaer/XSearcher/issues{/number}","pulls_url":"https://api.github.com/repos/mormaer/XSearcher/pulls{/number}","milestones_url":"https://api.github.com/repos/mormaer/XSearcher/milestones{/number}","notifications_url":"https://api.github.com/repos/mormaer/XSearcher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mormaer/XSearcher/labels{/name}","releases_url":"https://api.github.com/repos/mormaer/XSearcher/releases{/id}","deployments_url":"https://api.github.com/repos/mormaer/XSearcher/deployments","created_at":"2016-03-02T21:14:30Z","updated_at":"2016-10-23T20:04:32Z","pushed_at":"2017-09-14T21:18:14Z","git_url":"git://github.com/mormaer/XSearcher.git","ssh_url":"git@github.com:mormaer/XSearcher.git","clone_url":"https://github.com/mormaer/XSearcher.git","svn_url":"https://github.com/mormaer/XSearcher","homepage":"","size":411,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mormaer/XSearcher/pulls/20"},"html":{"href":"https://github.com/mormaer/XSearcher/pull/20"},"issue":{"href":"https://api.github.com/repos/mormaer/XSearcher/issues/20"},"comments":{"href":"https://api.github.com/repos/mormaer/XSearcher/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/mormaer/XSearcher/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/mormaer/XSearcher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mormaer/XSearcher/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/mormaer/XSearcher/statuses/0876d35acc153951ecee44584e06b553c6386f55"}},"author_association":"OWNER"}}
{"actor":{"display_login":"mormaer"}}