mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-10-01 15:22:35 -05:00
Allow tab completion to work in battles
This commit is contained in:
@@ -2169,6 +2169,7 @@ var Battle = (function () {
|
||||
// external
|
||||
this.resumeButton = this.play;
|
||||
|
||||
this.users = {};
|
||||
this.preloadCache = {};
|
||||
|
||||
this.preloadEffects();
|
||||
@@ -5679,12 +5680,14 @@ var Battle = (function () {
|
||||
break;
|
||||
case 'join':
|
||||
case 'j':
|
||||
this.users[toUserid(args[1])] = ' ' + args[1];
|
||||
if (!this.ignoreSpects) {
|
||||
this.log('<div class="chat"><small>' + Tools.escapeHTML(args[1]) + ' joined.</small></div>', preempt);
|
||||
}
|
||||
break;
|
||||
case 'leave':
|
||||
case 'l':
|
||||
delete this.users[toUserid(args[1])];
|
||||
if (!this.ignoreSpects) {
|
||||
this.log('<div class="chat"><small>' + Tools.escapeHTML(args[1]) + ' left.</small></div>', preempt);
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
BattleSound.setMute(Tools.prefs('mute'));
|
||||
this.battle = new Battle(this.$battle, this.$chatFrame);
|
||||
this.users = this.battle.users;
|
||||
|
||||
this.$chat = this.$chatFrame.find('.inner');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user