.
diff --git a/README.md b/README.md
deleted file mode 100644
index 6ff6dbf..0000000
--- a/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
- ยป Kartik Server ยซ
-
developed with
-
-
-
-----
-
-A low latency game proxy for Kartik. Note that it is **only** a proxy and does not control any packet sent between clients (e.g. it doesn't check for cheats)
-
-* **Status:** ๐ป Actively maintained
-
-
-
-
-## Summary
-* **Language:** JavaScript
-* **Started:** April 2021
-* **License:** GNU General Public License 3.0
-* **Website:** https://kartik.hopto.org
-
-## Setup
-* Clone the repository
-* Change the `ServerPort` in **index.js**
-* Start it: `node index.js`
-* In your copy of the Kartik game, put your connection settings to `/online/server.json`
-
-## Issues
-Issues are reported using GitHub issues.
diff --git a/index.js b/index.js
index cf1e65f..733c338 100644
--- a/index.js
+++ b/index.js
@@ -1,7 +1,7 @@
-const ServerPort = 8888;
+const ServerPort = 8448;
const AllowMods = false;
-const _version = "0.1";
+const _version = "0.2";
const Net = require('net');
const clients = {};
@@ -67,7 +67,7 @@ server.on('connection', (socket) => {
console.log("New connection " + socket.connectionId)
if (clients.length > 280) {
- throw new KartikError("Server is full", "net.minteckprojects.kartik.KartikServer.IdentifierAllocationException");
+ throw new KartikError("Server is full", "lt.ro.minteck.cutefox.kartik.KartikServer.IdentifierAllocationException");
}
socket.write(JSON.stringify(
@@ -83,7 +83,7 @@ server.on('connection', (socket) => {
setTimeout(() => {
try {
if (socket.linkedTo === null) {
- throw new KartikError("Not linked within 3 minutes", "net.minteckprojects.kartik.KartikServer.ClientConnectTimeoutException");
+ throw new KartikError("Not linked within 3 minutes", "lt.ro.minteck.cutefox.kartik.KartikServer.ClientConnectTimeoutException");
}
} catch (e) {
console.error(e);
@@ -122,17 +122,17 @@ server.on('connection', (socket) => {
if (data.length > 1200) {
console.dir(data);
- throw new KartikError("Received data is too long", "net.minteckprojects.kartik.KartikServer.DataLengthException");
+ throw new KartikError("Received data is too long", "lt.ro.minteck.cutefox.kartik.KartikServer.DataLengthException");
}
if (typeof info['_type'] != "string") {
- throw new KartikError("Invalid JSON data", "net.minteckprojects.kartik.KartikServer.JsonDataException");
+ throw new KartikError("Invalid JSON data", "lt.ro.minteck.cutefox.kartik.KartikServer.JsonDataException");
}
if (!socket.initialized) {
switch (info['_type']) {
case "init":
if (info['name'] !== "Kartik Core") {
- throw new KartikError("Invalid client", "net.minteckprojects.kartik.KartikServer.AuthenticationException");
+ throw new KartikError("Invalid client", "lt.ro.minteck.cutefox.kartik.KartikServer.AuthenticationException");
}
if (!info.modded) {
console.log("Connection initialized. Client running " + info.name + " version " + info.version + ", official client");
@@ -146,18 +146,18 @@ server.on('connection', (socket) => {
socket.initialized = true;
break;
default:
- throw new KartikError("Trying to receive data but client not initialized", "net.minteckprojects.kartik.KartikServer.AuthenticationException");
+ throw new KartikError("Trying to receive data but client not initialized", "lt.ro.minteck.cutefox.kartik.KartikServer.AuthenticationException");
}
} else {
switch (info['_type']) {
case "init":
- throw new KartikError("Trying to initialize client but client is already initialized", "net.minteckprojects.kartik.KartikServer.AuthenticationException");
+ throw new KartikError("Trying to initialize client but client is already initialized", "lt.ro.minteck.cutefox.kartik.KartikServer.AuthenticationException");
case "link":
if (typeof info['client'] !== "string" || isNaN(parseInt(info['client'], 16))) {
- throw new KartikError("Invalid client link ID", "net.minteckprojects.kartik.KartikServer.GuestIdentifierException");
+ throw new KartikError("Invalid client link ID", "lt.ro.minteck.cutefox.kartik.KartikServer.GuestIdentifierException");
}
if (typeof clients[info['client']] === "undefined") {
- throw new KartikError("Guest client not found", "net.minteckprojects.kartik.KartikServer.GuestConnectException");
+ throw new KartikError("Guest client not found", "lt.ro.minteck.cutefox.kartik.KartikServer.GuestConnectException");
}
if (clients[info['client']].linkedTo === null) {
socket.linkedTo = clients[info['client']];
@@ -186,12 +186,12 @@ server.on('connection', (socket) => {
))
console.log("Link created: (H) " + socket.connectionId + " <-> " + socket.linkedTo.connectionId + " (G)")
} else {
- throw new KartikError("Client already linked to another client", "net.minteckprojects.kartik.KartikServer.GuestAllocationException")
+ throw new KartikError("Client already linked to another client", "lt.ro.minteck.cutefox.kartik.KartikServer.GuestAllocationException")
}
break;
default:
if (socket.linkedTo === null) {
- throw new KartikError("Client not linked to another client", "net.minteckprojects.kartik.KartikServer.DataRoutingException");
+ throw new KartikError("Client not linked to another client", "lt.ro.minteck.cutefox.kartik.KartikServer.DataRoutingException");
} else {
socket.linkedTo.write(JSON.stringify(info));
}
@@ -231,17 +231,17 @@ server.on('connection', (socket) => {
if (data.length > 1200) {
console.dir(data);
- throw new KartikError("Received data is too long", "net.minteckprojects.kartik.KartikServer.DataLengthException");
+ throw new KartikError("Received data is too long", "lt.ro.minteck.cutefox.kartik.KartikServer.DataLengthException");
}
if (typeof info['_type'] != "string") {
- throw new KartikError("Invalid JSON data", "net.minteckprojects.kartik.KartikServer.JsonDataException");
+ throw new KartikError("Invalid JSON data", "lt.ro.minteck.cutefox.kartik.KartikServer.JsonDataException");
}
if (!socket.initialized) {
switch (info['_type']) {
case "init":
if (info['name'] !== "Kartik Core") {
- throw new KartikError("Invalid client", "net.minteckprojects.kartik.KartikServer.AuthenticationException");
+ throw new KartikError("Invalid client", "lt.ro.minteck.cutefox.kartik.KartikServer.AuthenticationException");
}
if (!info.modded) {
console.log("Connection initialized. Client running " + info.name + " version " + info.version + ", official client");
@@ -255,12 +255,12 @@ server.on('connection', (socket) => {
socket.initialized = true;
break;
default:
- throw new KartikError("Trying to receive data but client not initialized", "net.minteckprojects.kartik.KartikServer.AuthenticationException");
+ throw new KartikError("Trying to receive data but client not initialized", "lt.ro.minteck.cutefox.kartik.KartikServer.AuthenticationException");
}
} else {
switch (info['_type']) {
case "init":
- throw new KartikError("Trying to initialize client but client is already initialized", "net.minteckprojects.kartik.KartikServer.AuthenticationException");
+ throw new KartikError("Trying to initialize client but client is already initialized", "lt.ro.minteck.cutefox.kartik.KartikServer.AuthenticationException");
case "ping":
socket.write(JSON.stringify(
{
@@ -270,10 +270,10 @@ server.on('connection', (socket) => {
break;
case "link":
if (typeof info['client'] !== "string" || isNaN(parseInt(info['client'], 36))) {
- throw new KartikError("Invalid client link ID", "net.minteckprojects.kartik.KartikServer.GuestIdentifierException");
+ throw new KartikError("Invalid client link ID", "lt.ro.minteck.cutefox.kartik.KartikServer.GuestIdentifierException");
}
if (typeof clients[info['client']] === "undefined") {
- throw new KartikError("Guest client not found", "net.minteckprojects.kartik.KartikServer.GuestConnectException");
+ throw new KartikError("Guest client not found", "lt.ro.minteck.cutefox.kartik.KartikServer.GuestConnectException");
}
if (clients[info['client']].linkedTo === null) {
socket.linkedTo = clients[info['client']];
@@ -302,12 +302,12 @@ server.on('connection', (socket) => {
) + "\n")
console.log("Link created: (H) " + socket.connectionId + " <-> " + socket.linkedTo.connectionId + " (G)")
} else {
- throw new KartikError("Client already linked to another client", "net.minteckprojects.kartik.KartikServer.GuestAllocationException")
+ throw new KartikError("Client already linked to another client", "lt.ro.minteck.cutefox.kartik.KartikServer.GuestAllocationException")
}
break;
default:
if (socket.linkedTo === null) {
- throw new KartikError("Client not linked to another client", "net.minteckprojects.kartik.KartikServer.DataRoutingException");
+ throw new KartikError("Client not linked to another client", "lt.ro.minteck.cutefox.kartik.KartikServer.DataRoutingException");
} else {
socket.linkedTo.write(JSON.stringify(info).replaceAll("<", "-").replaceAll(">", "-") + "\n");
}
--
cgit