diff --git a/js/client-rooms.js b/js/client-rooms.js index 52242b7ad..d1f319b7a 100644 --- a/js/client-rooms.js +++ b/js/client-rooms.js @@ -157,6 +157,10 @@ this.$('button[name=refresh]').focus(); this.$el.scrollTop(prevPos); }, + rejoin: function () { + app.send('/cmd roomlist'); + this.lastUpdate = new Date().getTime(); + }, update: function (data) { if (!data && !this.data) { if (app.isDisconnected) { diff --git a/js/client.js b/js/client.js index 8d0e1ac15..36833ba7b 100644 --- a/js/client.js +++ b/js/client.js @@ -1169,6 +1169,7 @@ joinRoom: function (id, type, nojoin) { if (this.rooms[id]) { this.focusRoom(id); + if (this.rooms[id].rejoin) this.rooms[id].rejoin(); return this.rooms[id]; } if (id.substr(0, 11) === 'battle-gen5' && !Tools.loadedSpriteData['bw']) Tools.loadSpriteData('bw');