mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-30 23:01:05 -05:00
Merge pull request #636 from Teremiare/patch-7
Don't let spectators chat in battles when they're ignoring spectators
This commit is contained in:
@@ -93,7 +93,9 @@
|
||||
this.tabComplete.reset();
|
||||
this.chatHistory.push(text);
|
||||
text = this.parseCommand(text);
|
||||
if (text) {
|
||||
if (this.battle && this.battle.ignoreSpects && app.user.get('userid') !== this.battle.p1.id && app.user.get('userid') !== this.battle.p2.id) {
|
||||
this.add("You can't chat in this battle as you're currently ignoring spectators");
|
||||
} else if (text) {
|
||||
this.send(text);
|
||||
}
|
||||
this.$chatbox.val('');
|
||||
|
||||
Reference in New Issue
Block a user