Skip to content

Commit

Permalink
feat: remove /die
Browse files Browse the repository at this point in the history
  • Loading branch information
vyneer committed Aug 22, 2023
1 parent 54dc7fa commit 21aab27
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 103 deletions.
22 changes: 2 additions & 20 deletions assets/chat/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Binary file removed assets/chat/img/tombstone.png
Binary file not shown.
22 changes: 0 additions & 22 deletions assets/chat/js/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
5 changes: 0 additions & 5 deletions assets/chat/js/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
1 change: 0 additions & 1 deletion assets/chat/js/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
})
);

Expand Down
2 changes: 0 additions & 2 deletions assets/chat/js/focus.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down
46 changes: 0 additions & 46 deletions assets/chat/js/messages/ChatDeathMessage.js

This file was deleted.

5 changes: 0 additions & 5 deletions assets/chat/js/messages/MessageBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []) {
Expand Down Expand Up @@ -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);
}
}
1 change: 0 additions & 1 deletion assets/chat/js/messages/MessageTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ export default {
GIFTSUB: 'GIFTSUB',
MASSGIFT: 'MASSGIFT',
DONATION: 'DONATION',
DEATH: 'DEATH',
};
1 change: 0 additions & 1 deletion assets/chat/js/messages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ export {
default as PinnedMessage,
checkIfPinWasDismissed,
} from './PinnedMessage';
export { default as ChatDeathMessage } from './ChatDeathMessage';

0 comments on commit 21aab27

Please sign in to comment.