From 86eff1185c075c3709ad300ca225eda8ac7cf88e Mon Sep 17 00:00:00 2001 From: HF Date: Mon, 5 Jun 2023 02:34:14 +0200 Subject: [PATCH] let users with id below 5000 talk in chat even when their country is muted --- src/core/ChatProvider.js | 2 +- src/data/redis/lua/allowedChat.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/ChatProvider.js b/src/core/ChatProvider.js index 80dc734b..e0a8b3e6 100644 --- a/src/core/ChatProvider.js +++ b/src/core/ChatProvider.js @@ -424,7 +424,7 @@ export class ChatProvider { channelId, id, user.ipSub, - country, + (id > 5000) ? country : 'nope', ); if (allowed) { logger.info( diff --git a/src/data/redis/lua/allowedChat.lua b/src/data/redis/lua/allowedChat.lua index 7036ef29..a5ec7256 100644 --- a/src/data/redis/lua/allowedChat.lua +++ b/src/data/redis/lua/allowedChat.lua @@ -18,7 +18,7 @@ -- } local ret = {0, 0} -- check country mute -if redis.call('hget', KEYS[1], ARGV[1]) then +if ARGV[1] ~= "nope" and redis.call('hget', KEYS[1], ARGV[1]) then ret[1] = 100 return ret end