aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
Diffstat (limited to 'webAO')
-rw-r--r--webAO/client.ts16
1 files changed, 9 insertions, 7 deletions
diff --git a/webAO/client.ts b/webAO/client.ts
index 566334e..e5c5e2b 100644
--- a/webAO/client.ts
+++ b/webAO/client.ts
@@ -38,6 +38,7 @@ export const UPDATE_INTERVAL = 60;
*/
export let oldLoading = false;
export const setOldLoading = (val: boolean) => {
+ console.warn("old loading set to "+val)
oldLoading = val
}
@@ -261,7 +262,6 @@ class Client extends EventEmitter {
}
const packet_list = in_data.split("%");
- console.log(packet_list)
for (var packet of packet_list) {
let f_contents;
@@ -280,12 +280,14 @@ class Client extends EventEmitter {
}
// Take the first arg as the command
const command = f_contents[0];
- console.log(command)
- // The rest is contents of the packet
- packetHandler.has(command)
- ? packetHandler.get(command)(f_contents)
- : console.warn(`Invalid packet header ${command}`);
- };
+ if(command!=="")
+ {
+ // The rest is contents of the packet
+ packetHandler.has(command)
+ ? packetHandler.get(command)(f_contents)
+ : console.warn(`Invalid packet header ${command}`);
+ };
+ }
}