diff options
Diffstat (limited to 'webAO')
| -rw-r--r-- | webAO/client.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/webAO/client.js b/webAO/client.js index f196dac..7848398 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -514,11 +514,17 @@ class Client extends EventEmitter { console.debug("S: " + msg); const lines = msg.split("%"); - const args = lines[0].split("#"); - const header = args[0]; - if (!this.emit(header, args)) { - console.warn(`Invalid packet header ${header}`); + for (const msg of lines) { + if(msg === "") + break; + + const args = msg.split("#"); + const header = args[0]; + + if (!this.emit(header, args)) { + console.warn(`Invalid packet header ${header}`); + } } } |
