diff --git a/assets/chat/css/style.scss b/assets/chat/css/style.scss index 09ae3c39..be2ed876 100644 --- a/assets/chat/css/style.scss +++ b/assets/chat/css/style.scss @@ -533,8 +533,7 @@ hr { .msg-donation, .msg-subscription, .msg-giftsub, -.msg-massgift, -.msg-death { +.msg-massgift { text-shadow: 1px 1px 3px rgba(0, 0, 0, 1); font-size: 1.1em; font-weight: 400; @@ -720,22 +719,6 @@ hr { } } -/* Death messages */ -.msg-death { - font-size: unset; - - .death-icon { - background: transparent url('../img/tombstone.png') no-repeat center center; - background-size: contain; - filter: invert(100%); - } - - .event-top, - .event-bottom { - padding: 0 $gutter-md * 2 0 $gutter-md; - } -} - /* Highlight */ .msg-highlight { color: $color-chat-text1; @@ -1866,8 +1849,7 @@ button.btn { .msg-donation, .msg-subscription, .msg-giftsub, - .msg-massgift, - .msg-death { + .msg-massgift { text-shadow: none; padding: 0; border-style: none none none solid; diff --git a/assets/chat/img/tombstone.png b/assets/chat/img/tombstone.png deleted file mode 100644 index a92afec2..00000000 Binary files a/assets/chat/img/tombstone.png and /dev/null differ diff --git a/assets/chat/js/chat.js b/assets/chat/js/chat.js index fd3c1e04..196e40eb 100644 --- a/assets/chat/js/chat.js +++ b/assets/chat/js/chat.js @@ -142,7 +142,6 @@ class Chat { this.source.on('DONATION', (data) => this.onDONATION(data)); this.source.on('ADDPHRASE', (data) => this.onADDPHRASE(data)); this.source.on('REMOVEPHRASE', (data) => this.onREMOVEPHRASE(data)); - this.source.on('DEATH', (data) => this.onDEATH(data)); this.control.on('SEND', (data) => this.cmdSEND(data)); this.control.on('HINT', (data) => this.cmdHINT(data)); @@ -218,9 +217,6 @@ class Chat { this.control.on('DPHRASE', (data) => this.cmdREMOVEPHRASE(data)); this.control.on('DBAN', (data) => this.cmdREMOVEPHRASE(data)); this.control.on('DMUTE', (data) => this.cmdREMOVEPHRASE(data)); - this.control.on('DIE', (data) => this.cmdDIE(data)); - this.control.on('SUICIDE', (data) => this.cmdDIE(data)); - this.control.on('BITLY', (data) => this.cmdDIE(data)); } setUser(user) { @@ -1300,20 +1296,6 @@ class Chat { ).into(this); } - onDEATH(data) { - const user = this.users.get(data.nick) ?? new ChatUser(data.nick); - MessageBuilder.death(data.data, user, data.extradata, data.timestamp).into( - this - ); - if (user.username.toLowerCase() === data.nick.toLowerCase()) { - if (isMuteActive(data)) { - this.mutedtimer.setTimer(data.duration); - this.mutedtimer.startTimer(); - } - } - this.censor(data.nick); - } - onPRIVMSGSENT() { if (this.mainwindow.visible) { MessageBuilder.info('Your message has been sent.').into(this); @@ -2283,10 +2265,6 @@ class Chat { this.source.send('REMOVEPHRASE', { data: parts.join(' ') }); } - cmdDIE(parts) { - this.source.send('DIE', { data: parts.join(' ') }); - } - openConversation(nick) { const normalized = nick.toLowerCase(); const conv = this.whispers.get(normalized); diff --git a/assets/chat/js/commands.js b/assets/chat/js/commands.js index f254a6e0..edc2a193 100644 --- a/assets/chat/js/commands.js +++ b/assets/chat/js/commands.js @@ -30,11 +30,6 @@ const CHAT_COMMANDS = [ name: 'baninfo', description: 'Check your ban status.', }, - { - name: 'die', - description: 'Mute yourself for 10 minutes.', - alias: ['suicide', 'bitly'], - }, { name: 'embed', description: 'Embed a video to bigscreen.', diff --git a/assets/chat/js/const.js b/assets/chat/js/const.js index e1158b36..4a568d8c 100644 --- a/assets/chat/js/const.js +++ b/assets/chat/js/const.js @@ -83,7 +83,6 @@ const errorstrings = new Map( 'Your message was filtered because it contained a banned phrase.', duplicatephrase: 'Banned phrase already exists.', nophrase: "Banned phrase doesn't exist.", - cantbanprotected: "Protected users can't die.", }) ); diff --git a/assets/chat/js/focus.js b/assets/chat/js/focus.js index 862520b5..7466e592 100644 --- a/assets/chat/js/focus.js +++ b/assets/chat/js/focus.js @@ -52,7 +52,6 @@ class ChatUserFocus { .msg-massgift[data-username="${value}"], .msg-massgift[data-mentioned~="${value}"], .msg-donation[data-username="${value}"], .msg-donation[data-mentioned~="${value}"], .msg-pinned[data-username="${value}"], .msg-pinned[data-mentioned~="${value}"], - .msg-death[data-username="${value}"], .msg-death[data-mentioned~="${value}"], .msg-user[data-username="${value}"], .msg-user[data-mentioned~="${value}"] { opacity:1 !important; } @@ -64,7 +63,6 @@ class ChatUserFocus { .msg-massgift[data-username="${value}"], .msg-donation[data-username="${value}"], .msg-pinned[data-username="${value}"], - .msg-death[data-username="${value}"], .msg-user[data-username="${value}"] { opacity:1 !important; } diff --git a/assets/chat/js/messages/ChatDeathMessage.js b/assets/chat/js/messages/ChatDeathMessage.js deleted file mode 100644 index df8a4bbe..00000000 --- a/assets/chat/js/messages/ChatDeathMessage.js +++ /dev/null @@ -1,46 +0,0 @@ -import { usernameColorFlair } from './ChatUserMessage'; -import ChatEventMessage from './ChatEventMessage'; -import MessageTypes from './MessageTypes'; - -export default class ChatDeathMessage extends ChatEventMessage { - constructor(message, user, flavorText, timestamp) { - super(message, timestamp); - this.user = user; - this.type = MessageTypes.DEATH; - this.flavorText = flavorText; - } - - html(chat = null) { - const eventTemplate = super.html(chat); - - /** @type HTMLAnchorElement */ - const user = document - .querySelector('#user-template') - ?.content.cloneNode(true).firstElementChild; - - const colorFlair = usernameColorFlair(chat.flairs, this.user); - - user.title = this.title; - user.classList.add(colorFlair?.name); - user.innerText = this.user.username; - - eventTemplate - .querySelector('.event-info') - .append(user, ` ${this.flavorText}!`); - - eventTemplate.querySelector('.event-icon').classList.add('death-icon'); - - const classes = Array.from(eventTemplate.classList); - const attributes = eventTemplate - .getAttributeNames() - .reduce((object, attributeName) => { - if (attributeName === 'class') return object; - return { - ...object, - [attributeName]: eventTemplate.getAttribute(attributeName), - }; - }, {}); - - return this.wrap(eventTemplate.innerHTML, classes, attributes); - } -} diff --git a/assets/chat/js/messages/MessageBuilder.js b/assets/chat/js/messages/MessageBuilder.js index 05c9cafb..888c660f 100644 --- a/assets/chat/js/messages/MessageBuilder.js +++ b/assets/chat/js/messages/MessageBuilder.js @@ -8,7 +8,6 @@ import ChatDonationMessage from './ChatDonationMessage'; import ChatRegularSubscriptionMessage from './subscriptions/ChatRegularSubscriptionMessage'; import ChatGiftedSubscriptionMessage from './subscriptions/ChatGiftedSubscriptionMessage'; import ChatMassSubscriptionMessage from './subscriptions/ChatMassSubscriptionMessage'; -import ChatDeathMessage from './ChatDeathMessage'; export default class MessageBuilder { static element(message, classes = []) { @@ -103,8 +102,4 @@ export default class MessageBuilder { static donation(message, user, currency, timestamp = null) { return new ChatDonationMessage(message, user, currency, timestamp); } - - static death(message, user, flavorText, timestamp = null) { - return new ChatDeathMessage(message, user, flavorText, timestamp); - } } diff --git a/assets/chat/js/messages/MessageTypes.js b/assets/chat/js/messages/MessageTypes.js index b4b8a3a9..312a0008 100644 --- a/assets/chat/js/messages/MessageTypes.js +++ b/assets/chat/js/messages/MessageTypes.js @@ -13,5 +13,4 @@ export default { GIFTSUB: 'GIFTSUB', MASSGIFT: 'MASSGIFT', DONATION: 'DONATION', - DEATH: 'DEATH', }; diff --git a/assets/chat/js/messages/index.js b/assets/chat/js/messages/index.js index f20c76b8..4732353c 100644 --- a/assets/chat/js/messages/index.js +++ b/assets/chat/js/messages/index.js @@ -12,4 +12,3 @@ export { default as PinnedMessage, checkIfPinWasDismissed, } from './PinnedMessage'; -export { default as ChatDeathMessage } from './ChatDeathMessage';