From 63f5dd5d2dacdbf80b09180ae9cf32885b1f112f Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Thu, 9 May 2013 18:40:41 -0700 Subject: [PATCH] Better support for old servers --- js/client-chat.js | 5 +++++ js/client.js | 3 +++ 2 files changed, 8 insertions(+) diff --git a/js/client-chat.js b/js/client-chat.js index 987d322ac..54bb332df 100644 --- a/js/client-chat.js +++ b/js/client-chat.js @@ -574,6 +574,11 @@ this.parseUserList(row[1]); break; + case 'formats': + // deprecated; please send formats to the global room + app.parseFormats(row); + break; + case 'raw': this.$chat.append('
' + Tools.sanitizeHTML(row.slice(1).join('|')) + '
'); break; diff --git a/js/client.js b/js/client.js index eb24aa5fc..02f48d89b 100644 --- a/js/client.js +++ b/js/client.js @@ -447,6 +447,9 @@ } else if (data.battlelog) { self.rooms[data.room].init(data.battlelog.join('\n')); } + if (data.u) { + self.rooms[data.room].parseUserList(data.u); + } } }, update: function (data) {