Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add /hidealtstext command #3750

Merged
merged 1 commit into from
Jul 13, 2017
Merged

Add /hidealtstext command #3750

merged 1 commit into from
Jul 13, 2017

Conversation

panpawn
Copy link
Contributor

@panpawn panpawn commented Jul 9, 2017

When a user is spamming, often times they are doing so under several accounts. When this happens, a staff member has to manually hide each alts messages in the room, which takes up one line of the chat for each alt. By doing this, it automatically does it on the same line as the lock message at the same time, which both clutters up the chat less and makes it easier on the staff

PREVIEW:

@Zarel
Copy link
Member

Zarel commented Jul 10, 2017

Maybe a separate /hidealts. I don't want locking someone on a shared IP to suddenly hide all their classmates' messages.

@panpawn
Copy link
Contributor Author

panpawn commented Jul 10, 2017

What should that say in the chat? Something like,
panpawn the legend's alternate account's messages were cleared from Lobby by panpawn.

@panpawn panpawn force-pushed the patch-299 branch 3 times, most recently from 5ecd146 to 844a172 Compare July 10, 2017 09:44
@panpawn
Copy link
Contributor Author

panpawn commented Jul 10, 2017

Maybe a separate /hidealts

Updated

@panpawn panpawn changed the title Hide messages of user's alts on locks/bans Add /hidealts command Jul 10, 2017
@Zarel
Copy link
Member

Zarel commented Jul 11, 2017

Well, not literally /hidealts, that sounds too much like it hides your alt list.

/hidetextalts?

@Zarel
Copy link
Member

Zarel commented Jul 11, 2017

/hidealtstext

@Zarel
Copy link
Member

Zarel commented Jul 11, 2017

It doesn't necessarily even need text

@panpawn panpawn changed the title Add /hidealts command Add /hidealtstext command Jul 11, 2017
@panpawn panpawn force-pushed the patch-299 branch 2 times, most recently from d60fa4b to 8c7277c Compare July 11, 2017 12:53
@panpawn
Copy link
Contributor Author

panpawn commented Jul 11, 2017

Updated

chat-commands.js Outdated
this.add('|unlink|' + hidetype + userid);
if (userid !== toId(this.inputUsername)) this.add('|unlink|' + hidetype + toId(this.inputUsername));
if (cmd === 'hidealtstext' || cmd === 'hidetextalts') {
this.addModCommand(`${targetUser.name}'s alternate account's messages were cleared from ${room.title} by ${user.name}.`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[USER]'s alts' messages were...

chat-commands.js Outdated
this.add('|unlink|' + hidetype + userid);
if (userid !== toId(this.inputUsername)) this.add('|unlink|' + hidetype + toId(this.inputUsername));
if (cmd === 'hidealtstext' || cmd === 'hidetextalts') {
this.addModCommand(`[${targetUser.userid}]'s alts' messages were cleared from ${room.title} by ${user.name}.`);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this should be targetUser.userid here instead of targetUser.name

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...by "[USER]" I meant ${targetUser.name} not [${targetUser.userid}]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... oh

@panpawn
Copy link
Contributor Author

panpawn commented Jul 12, 2017

Updated

@panpawn panpawn force-pushed the patch-299 branch 2 times, most recently from 81a5f29 to a79d831 Compare July 12, 2017 13:20
When a user is spamming, often times they are doing so under several accounts.  When this happens, a staff member has to manually hide each alts messages in the room, which takes up one line of the chat for each alt.  This command makes these cases easier and less-spammy for the chat.
@panpawn
Copy link
Contributor Author

panpawn commented Jul 12, 2017

Sorry for the confusion, does this look better?

this.add('|unlink|' + hidetype + userid);
if (userid !== toId(this.inputUsername)) this.add('|unlink|' + hidetype + toId(this.inputUsername));
if (cmd === 'hidealtstext' || cmd === 'hidetextalts') {
this.addModCommand(`${targetUser.name}'s alts' messages were cleared from ${room.title} by ${user.name}.`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe make this only appear to staff.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has to add something besides the |unlink|hide| messages to the room in order for them to appear to new users joining the room though

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm

@Zarel Zarel merged commit 72a5beb into smogon:master Jul 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants