summary refs log tree commit diff
path: root/gateway
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-06-02 16:29:56 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-06-02 16:29:56 +1000
commit948d0757e1d585811541074b18b99419a14c30d8 (patch)
treef572c01f9b405fae8bbf62fbefbdae95f14a3c79 /gateway
parentAdded README, added more UDP decryption stuff (diff)
parentMerge pull request #759 from MaddyUnderStars/fix/respectRegisterConfig (diff)
downloadserver-948d0757e1d585811541074b18b99419a14c30d8.tar.xz
Merge branch 'master' into maddyrtc
Diffstat (limited to 'gateway')
-rw-r--r--gateway/LICENSE14
-rw-r--r--gateway/client.js51
-rw-r--r--gateway/package.json2
3 files changed, 1 insertions, 66 deletions
diff --git a/gateway/LICENSE b/gateway/LICENSE
deleted file mode 100644
index f19bf520..00000000
--- a/gateway/LICENSE
+++ /dev/null
@@ -1,14 +0,0 @@
-Copyright (C) 2021 Fosscord and contributors
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as
-published by the Free Software Foundation, either version 3 of the
-License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU Affero General Public License for more details.
-
-You should have received a copy of the GNU Affero General Public License
-along with this program.  If not, see <https://www.gnu.org/licenses/>.
\ No newline at end of file
diff --git a/gateway/client.js b/gateway/client.js
deleted file mode 100644
index c841c6a0..00000000
--- a/gateway/client.js
+++ /dev/null
@@ -1,51 +0,0 @@
-require("missing-native-js-functions");
-const WebSocket = require("ws");
-const Constants = require("./dist/util/Constants");
-
-// const ws = new WebSocket("ws://127.0.0.1:8080");
-const ws = new WebSocket("wss://dev.fosscord.com");
-
-ws.on("open", () => {
-	// ws.send(JSON.stringify({ req_type: "new_auth" }));
-	// ws.send(JSON.stringify({ req_type: "check_auth", token: "" }));
-	// op: 0,
-	// d: {},
-	// s: 42,
-	// t: "GATEWAY_EVENT_NAME",
-});
-
-function send(data) {
-	ws.send(JSON.stringify(data));
-}
-
-ws.on("message", (buffer) => {
-	let data = JSON.parse(buffer.toString());
-	console.log(data);
-
-	switch (data.op) {
-		case 10:
-			setIntervalNow(() => {
-				send({ op: 1 });
-			}, data.d.heartbeat_interval);
-
-			// send({
-			// 	op: 2,
-			// 	d: {
-			// 		token:
-			// 			"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjgxMTY0MjkxNzQzMjA2NjA0OCIsImlhdCI6MTYxMzU4MTE1MX0.7Qj_z2lYIgJ0rc7NfGtpW5DKGqecQfv1mLpoBUQHKDc",
-			// 		intents: 0n,
-			// 		properties: {},
-			// 	},
-			// });
-
-			send({
-				op: 6,
-			});
-
-			break;
-	}
-});
-
-ws.on("close", (code, reason) => {
-	console.log(code, reason, Constants.CLOSECODES[code]);
-});
diff --git a/gateway/package.json b/gateway/package.json
index 6d0d2d1c..92d812b4 100644
--- a/gateway/package.json
+++ b/gateway/package.json
@@ -13,7 +13,7 @@
 	},
 	"keywords": [],
 	"author": "Fosscord",
-	"license": "GPLV3",
+	"license": "AGPLV3",
 	"devDependencies": {
 		"@types/amqplib": "^0.8.1",
 		"@types/jsonwebtoken": "^8.5.0",