diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2020-04-24 21:44:56 +0200 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2020-04-24 21:44:56 +0200 |
commit | d0b6c14bd16eabd8cbd4d850ab391c785dd9b736 (patch) | |
tree | 05aa33ffeaa21dbc305949ffa6958cd1a9662de6 /server/src/commands | |
parent | remove check for multiple user with same name (diff) | |
download | hackchat-d0b6c14bd16eabd8cbd4d850ab391c785dd9b736.tar.gz hackchat-d0b6c14bd16eabd8cbd4d850ab391c785dd9b736.zip |
remove rate limiter in join and chat for moderator
Diffstat (limited to '')
-rw-r--r-- | server/src/commands/core/chat.js | 2 | ||||
-rw-r--r-- | server/src/commands/core/join.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/server/src/commands/core/chat.js b/server/src/commands/core/chat.js index 908c205..fad9ea0 100644 --- a/server/src/commands/core/chat.js +++ b/server/src/commands/core/chat.js @@ -33,7 +33,7 @@ export async function run(core, server, socket, data) { // check for spam const score = text.length / 83 / 4; - if (server.police.frisk(socket.address, score)) { + if (server.police.frisk(socket.address, score) && !UAC.isModerator(socket.level)) { return server.reply({ cmd: 'warn', text: 'You are sending too much text. Wait a moment and try again.\nPress the up arrow key to restore your last message.', diff --git a/server/src/commands/core/join.js b/server/src/commands/core/join.js index c4f4f4f..719fa51 100644 --- a/server/src/commands/core/join.js +++ b/server/src/commands/core/join.js @@ -66,7 +66,7 @@ export function parseNickname(core, data) { // module main export async function run(core, server, socket, data) { // check for spam - if (server.police.frisk(socket.address, 3)) { + if (server.police.frisk(socket.address, 3) && !UAC.isModerator(socket.level)) { return server.reply({ cmd: 'warn', text: 'You are joining channels too fast. Wait a moment and try again.', |