fix userid < 5000 special chat priviledge
This commit is contained in:
parent
5743276ea9
commit
263c89fef5
|
@ -424,7 +424,7 @@ export class ChatProvider {
|
||||||
channelId,
|
channelId,
|
||||||
id,
|
id,
|
||||||
user.ipSub,
|
user.ipSub,
|
||||||
(id > 5000) ? country : 'nope',
|
country,
|
||||||
);
|
);
|
||||||
if (allowed) {
|
if (allowed) {
|
||||||
logger.info(
|
logger.info(
|
||||||
|
|
|
@ -16,15 +16,15 @@ export async function allowedChat(
|
||||||
ip,
|
ip,
|
||||||
cc,
|
cc,
|
||||||
) {
|
) {
|
||||||
if (!cc || cc.length !== 2) {
|
|
||||||
return [0, 0];
|
|
||||||
}
|
|
||||||
const mutecKey = `${MUTEC_PREFIX}:${channelId}`;
|
const mutecKey = `${MUTEC_PREFIX}:${channelId}`;
|
||||||
const muteKey = `${MUTE_PREFIX}:${userId}`;
|
const muteKey = `${MUTE_PREFIX}:${userId}`;
|
||||||
const isalKey = `${ALLOWED_PREFIX}:${ip}`;
|
const isalKey = `${ALLOWED_PREFIX}:${ip}`;
|
||||||
|
const country = (cc?.length !== 2 || userId < 5000) ? 'nope' : cc;
|
||||||
return client.allowedChat(
|
return client.allowedChat(
|
||||||
mutecKey, muteKey, isalKey,
|
mutecKey,
|
||||||
cc,
|
muteKey,
|
||||||
|
isalKey,
|
||||||
|
country,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user