aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2020-04-20 00:57:31 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2020-04-20 00:57:31 +0200
commitae87428fddc49894739357b11b7fba6a9d4e0c55 (patch)
tree02b6f148f0aa31db89184e46a08aed63acf67fbf
parentadd basepath to use reverse proxy (diff)
downloadhackchat-ae87428fddc49894739357b11b7fba6a9d4e0c55.tar.gz
hackchat-ae87428fddc49894739357b11b7fba6a9d4e0c55.zip
remove check for multiple user with same name
-rw-r--r--server/src/commands/core/bridge.js32
1 files changed, 0 insertions, 32 deletions
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",