From ae87428fddc49894739357b11b7fba6a9d4e0c55 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Mon, 20 Apr 2020 00:57:31 +0200 Subject: remove check for multiple user with same name --- server/src/commands/core/bridge.js | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'server/src') diff --git a/server/src/commands/core/bridge.js b/server/src/commands/core/bridge.js index f80f11b..a289310 100644 --- a/server/src/commands/core/bridge.js +++ b/server/src/commands/core/bridge.js @@ -56,38 +56,6 @@ export async function run(core, server, socket, data) { ); } - // prevent admin impersonation - // TODO: prevent mod impersonation - if (newNick.toLowerCase() === core.config.adminName.toLowerCase()) { - server.police.frisk(socket.address, 4); - - return server.reply( - { - cmd: "warn", - text: "You are not the admin, liar!", - }, - socket - ); - } - - // find any sockets that have the same nickname - const userExists = server.findSockets({ - channel: socket.channel, - nick: (targetNick) => targetNick.toLowerCase() === newNick.toLowerCase(), - }); - - // return error if found - if (userExists.length > 0) { - // That nickname is already in that channel - return server.reply( - { - cmd: "warn", - text: "Nickname taken", - }, - socket - ); - } - // build chat payload const payload = { cmd: "chat", -- cgit v1.2.1