From 6f6b564f7f0ea664b0102012c0aa92bd8bbddd3d Mon Sep 17 00:00:00 2001 From: Mia <49593536+mia-pi-git@users.noreply.github.com> Date: Mon, 7 Jun 2021 22:06:37 -0500 Subject: [PATCH] Hangman: Don't allow filtered words in guesses --- server/chat-plugins/hangman.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/chat-plugins/hangman.ts b/server/chat-plugins/hangman.ts index 46ffaccafa..b13de6c221 100644 --- a/server/chat-plugins/hangman.ts +++ b/server/chat-plugins/hangman.ts @@ -324,6 +324,8 @@ export const commands: Chat.ChatCommands = { createhelp: ["/hangman create [word], [hint] - Makes a new hangman game. Requires: % @ # &"], guess(target, room, user) { + const word = this.filter(target); + if (word !== target) return this.errorReply(`You may not use filtered words in guesses.`); this.parse(`/choose ${target}`); }, guesshelp: [