Skip to content
Snippets Groups Projects
Commit c9295c7e authored by mcmlxxix's avatar mcmlxxix
Browse files

moved constants inside main loop

added "alias" parameter
changed messages
parent 6f780837
No related branches found
No related tags found
No related merge requests found
...@@ -8,15 +8,15 @@ load("funclib.js"); ...@@ -8,15 +8,15 @@ load("funclib.js");
load("sbbsdefs.js"); load("sbbsdefs.js");
load("sockdefs.js"); load("sockdefs.js");
const QUERY= "?"; function ServiceConnection(id,alias)
const LOCAL= "&";
const FILESYNC= "@";
const connection_timeout= 5;
const connection_attempts= 2;
const connection_interval= 5;
function ServiceConnection(id)
{ {
const QUERY= "?";
const LOCAL= "&";
const FILESYNC= "@";
const connection_timeout= 5;
const connection_attempts= 2;
const connection_interval= 5;
this.id= (id?id:"default"); this.id= (id?id:"default");
this.notices= []; this.notices= [];
this.sock= false; this.sock= false;
...@@ -39,7 +39,7 @@ function ServiceConnection(id) ...@@ -39,7 +39,7 @@ function ServiceConnection(id)
if(testSocket(this.sock)) { if(testSocket(this.sock)) {
var hello=new Object(); var hello=new Object();
hello.context=LOCAL; hello.context=LOCAL;
hello.alias=user.alias; hello.alias=alias?alias:"unknown";
this.send(hello); this.send(hello);
attempts=0; attempts=0;
last_attempt=0; last_attempt=0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment