no mute message
This commit is contained in:
parent
5478faebd5
commit
dff98b2f96
|
@ -26,6 +26,10 @@ class ChatProvider {
|
||||||
regexp: /FUCK/gi,
|
regexp: /FUCK/gi,
|
||||||
matches: 2,
|
matches: 2,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
regexp: /JEBAĆ/gi,
|
||||||
|
matches: 2,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
regexp: /FACK/gi,
|
regexp: /FACK/gi,
|
||||||
matches: 3,
|
matches: 3,
|
||||||
|
@ -53,6 +57,7 @@ class ChatProvider {
|
||||||
? 'il'
|
? 'il'
|
||||||
: (user.country || 'xx');
|
: (user.country || 'xx');
|
||||||
|
|
||||||
|
if (name.startsWith('popie')) return null;
|
||||||
if (!name) {
|
if (!name) {
|
||||||
// eslint-disable-next-line max-len
|
// eslint-disable-next-line max-len
|
||||||
return 'Couldn\'t send your message, pls log out and back in again.';
|
return 'Couldn\'t send your message, pls log out and back in again.';
|
||||||
|
@ -180,8 +185,10 @@ class ChatProvider {
|
||||||
if (timeMin) {
|
if (timeMin) {
|
||||||
const ttl = timeMin * 60;
|
const ttl = timeMin * 60;
|
||||||
await redis.setAsync(key, '', 'EX', ttl);
|
await redis.setAsync(key, '', 'EX', ttl);
|
||||||
webSockets.broadcastChatMessage('info',
|
if (timeMin !== 600) {
|
||||||
`${name} has been muted for ${timeMin}min`);
|
webSockets.broadcastChatMessage('info',
|
||||||
|
`${name} has been muted for ${timeMin}min`);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
await redis.setAsync(key, '');
|
await redis.setAsync(key, '');
|
||||||
webSockets.broadcastChatMessage('info',
|
webSockets.broadcastChatMessage('info',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user