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