Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commits (1)
......@@ -269,6 +269,7 @@ function handle_outbound_server_connect() {
Unregistered[id] = new Unregistered_Client(id,this);
Unregistered[id].server = true; /* Avoid recvq limitation */
Unregistered[id].ircclass = this.cline.ircclass;
Unregistered[id].cline = this.cline;
this.callback_id = this.on("read", Socket_Recv);
return true;
}
......@@ -2893,8 +2894,12 @@ function CLine(host,password,servername,port,ircclass) {
this.servername = servername;
this.port = port;
this.ircclass = ircclass;
if (YLines[ircclass].connfreq > 0 && parseInt(port) > 0)
if ( YLines[ircclass].connfreq > 0
&& parseInt(port) > 0
&& !Servers[servername.toLowerCase()]
) {
Reset_Autoconnect(this, 1 /* connect immediately */);
}
}
function HLine(allowedmask,servername) {
......
......@@ -1278,7 +1278,7 @@ function Reset_Autoconnect(cline, freq) {
if (cline.next_connect)
js.clearTimeout(cline.next_connect);
if (!cline.port)
if (!cline.port || Servers[cline.servername.toLowerCase()])
return false;
cline.next_connect = js.setTimeout(
......@@ -1327,11 +1327,8 @@ function Server_Quit(str,suppress_bcast,is_netsplit,origin) {
}
if (this.local) {
if (YLines[this.ircclass].connfreq) {
if (YLines[this.ircclass].connfreq)
cline = Find_CLine_by_Server(this.nick);
if (cline)
Reset_Autoconnect(cline, YLines[this.ircclass].connfreq * 1000);
}
if (YLines[this.ircclass].active > 0)
YLine_Decrement(YLines[this.ircclass]);
......@@ -1371,7 +1368,9 @@ function Server_Quit(str,suppress_bcast,is_netsplit,origin) {
delete Local_Servers[this.nick.toLowerCase()];
delete Servers[this.nick.toLowerCase()];
delete this;
if (cline)
Reset_Autoconnect(cline, YLines[this.ircclass].connfreq * 1000);
}
function IRCClient_synchronize() {
......
......@@ -303,6 +303,13 @@ function Unregistered_Quit(msg) {
"%04u Connection closed.",
this.socket.descriptor
));
if ( typeof this.cline === 'object'
&& YLines[this.ircclass].connfreq > 0
&& this.cline.port > 0
&& !Servers[this.cline.servername.toLowerCase()]
) {
Reset_Autoconnect(this.cline, YLines[this.ircclass].connfreq * 1000);
}
js.clearInterval(this.pinginterval);
delete Assigned_IDs[this.id];
delete Unregistered[this.id];
......