diff --git a/exec/load/commclient.js b/exec/load/commclient.js index 7336f28e8aaf7cb772973fbf22f96809615cdf7c..79920be0da6913e34c5ae93c3077a1167cc65a27 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;