From 78ea25ed3769803adbb3e98f05f8a98f05370f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?charsy=E3=83=81=E3=83=A3=E3=83=BC=E3=82=B7=E3=82=A3?= Date: Sun, 28 Feb 2021 21:06:39 -0700 Subject: [PATCH] didn't commit these two for some reason --- src/Client.js | 5 ++--- src/Server.js | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Client.js b/src/Client.js index df7d72f..c19b37d 100644 --- a/src/Client.js +++ b/src/Client.js @@ -33,14 +33,13 @@ class Client extends EventEmitter { setChannel(_id, settings) { if (this.channel && this.channel._id == _id) return; if (this.server.rooms.get(_id)) { - let room = this.server.rooms.get(_id); + let room = this.server.rooms.get(_id, settings); let userbanned = room.bans.get(this.user._id); if (userbanned && (Date.now() - userbanned.bannedtime >= userbanned.msbanned)) { room.bans.delete(userbanned.user._id); userbanned = undefined; } if (userbanned) { - console.log(Date.now() - userbanned.bannedtime) room.Notification(this.user._id, "Notice", `Currently banned from \"${_id}\" for ${Math.ceil(Math.floor((userbanned.msbanned - (Date.now() - userbanned.bannedtime)) / 1000) / 60)} minutes.`, @@ -49,6 +48,7 @@ class Client extends EventEmitter { "#room", "short" ); + this.setChannel("test/awkward", settings); return; } let channel = this.channel; @@ -100,7 +100,6 @@ class Client extends EventEmitter { this.connectionid; this.server.connections.delete(this.connectionid); this.destroied = true; - console.log(`Removed Connection ${this.connectionid}.`); } bindEventListeners() { this.ws.on("message", (evt, admin) => { diff --git a/src/Server.js b/src/Server.js index afd7ae2..feff000 100644 --- a/src/Server.js +++ b/src/Server.js @@ -1,5 +1,6 @@ const Client = require("./Client.js"); const banned = require('../banned.json'); + class Server extends EventEmitter { constructor(config) { super();