aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinteck <minteck@phoenixnet.tech>2021-10-02 18:37:33 +0200
committerMinteck <minteck@phoenixnet.tech>2021-10-02 18:37:33 +0200
commita6b193d99f1dd88674291367df4d09cb117ef5d3 (patch)
treef48acef0aeac6352ed6f95950104ee92a87edf05
parent4a210e42a235bfa190ab730c1043dd97becbc775 (diff)
downloadkartik-iridium-a6b193d99f1dd88674291367df4d09cb117ef5d3.tar.gz
kartik-iridium-a6b193d99f1dd88674291367df4d09cb117ef5d3.tar.bz2
kartik-iridium-a6b193d99f1dd88674291367df4d09cb117ef5d3.zip
Fix the code that contains invalid characters
-rw-r--r--index.js4
-rw-r--r--package.json2
2 files changed, 3 insertions, 3 deletions
diff --git a/index.js b/index.js
index c325a13..95623ff 100644
--- a/index.js
+++ b/index.js
@@ -54,9 +54,9 @@ class KartikError extends Error {
const server = new Net.Server();
server.on('connection', (socket) => {
- socket.connectionId = "ird-" + (Math.random().toString().split(".")[1] + Math.random().toString().split(".")[1]).substr(0, 4);
+ socket.connectionId = "irid" + (Math.random().toString().split(".")[1] + Math.random().toString().split(".")[1]).substr(0, 4);
while (Object.keys(clients).includes(socket.connectionId)) {
- socket.connectionId = "ird-" + (Math.random().toString().split(".")[1] + Math.random().toString().split(".")[1]).substr(0, 4);
+ socket.connectionId = "irid" + (Math.random().toString().split(".")[1] + Math.random().toString().split(".")[1]).substr(0, 4);
}
socket.linkedTo = null;
clients[socket.connectionId] = socket;
diff --git a/package.json b/package.json
index fa6d619..32fff14 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "iridium",
- "version": "2.1.3",
+ "version": "2.2.0",
"description": "A next-generation Kartik server, based on the original server",
"main": "index.js",
"scripts": {