From c9295c7e1f4364fcadf1db2345934fd9676ff299 Mon Sep 17 00:00:00 2001 From: mcmlxxix <> Date: Mon, 3 May 2010 18:51:33 +0000 Subject: [PATCH] moved constants inside main loop added "alias" parameter changed messages --- exec/load/commclient.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/exec/load/commclient.js b/exec/load/commclient.js index 7336f28e8a..79920be0da 100644 --- a/exec/load/commclient.js +++ b/exec/load/commclient.js @@ -8,15 +8,15 @@ load("funclib.js"); load("sbbsdefs.js"); load("sockdefs.js"); -const QUERY= "?"; -const LOCAL= "&"; -const FILESYNC= "@"; -const connection_timeout= 5; -const connection_attempts= 2; -const connection_interval= 5; - -function ServiceConnection(id) +function ServiceConnection(id,alias) { + const QUERY= "?"; + const LOCAL= "&"; + const FILESYNC= "@"; + const connection_timeout= 5; + const connection_attempts= 2; + const connection_interval= 5; + this.id= (id?id:"default"); this.notices= []; this.sock= false; @@ -39,7 +39,7 @@ function ServiceConnection(id) if(testSocket(this.sock)) { var hello=new Object(); hello.context=LOCAL; - hello.alias=user.alias; + hello.alias=alias?alias:"unknown"; this.send(hello); attempts=0; last_attempt=0; -- GitLab