Skip to content

Commit

Permalink
Add alias for /cleartext (smogon#7850)
Browse files Browse the repository at this point in the history
* Add alias for /cleartext

Pr for https://www.smogon.com/forums/threads/add-a-short-alias-for-hidetext-hidelines-and-cleartext.3673226/#post-8700023

* Update server/chat-commands/moderation.ts

Co-authored-by: Annika <annika0uwu@gmail.com>

Co-authored-by: Annika <annika0uwu@gmail.com>
  • Loading branch information
2 people authored and Quanyails committed May 12, 2021
1 parent fa5e6b1 commit ecea3c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/chat-commands/moderation.ts
Expand Up @@ -1638,14 +1638,15 @@ export const commands: ChatCommands = {
hidelines: 'hidetext',
hlines: 'hidetext',
cleartext: 'hidetext',
ctext: 'hidetext',
clearaltstext: 'hidetext',
clearlines: 'hidetext',
forcecleartext: 'hidetext',
hidetext(target, room, user, connection, cmd) {
if (!target) return this.parse(`/help hidetext`);
room = this.requireRoom();
const hasLineCount = cmd.includes('lines');
const hideRevealButton = cmd.includes('clear');
const hideRevealButton = cmd.includes('clear') || cmd === 'ctext';
target = this.splitTarget(target);
let lineCount = 0;
if (/^[0-9]+\s*(,|$)/.test(target)) {
Expand Down

0 comments on commit ecea3c9

Please sign in to comment.