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

Commit f577dcb5 authored by deuce's avatar deuce

Allow ipv6 server to server conections, clean up the listener a bit.

parent dc688b8b
......@@ -174,7 +174,7 @@ if(this.server==undefined) { // Running from JSexec?
default_port = mline_port;
server = { socket: false, terminated: false,
version_detail: jsexec_revision_detail, interface_ip_addr_list: [0,"::"] };
version_detail: jsexec_revision_detail };
server.socket = create_new_socket(default_port)
if (!server.socket)
exit();
......@@ -627,9 +627,19 @@ function connect_to_server(this_cline,the_port) {
the_port = this_cline.port;
else if (!the_port)
the_port = default_port; // try a safe default.
connect_sock = new Socket();
connect_sock.bind(0,server.interface_ip_address);
connect_sock.connect(this_cline.host,the_port,ob_sock_timeout);
if (js.global.ConnectedSocket != undefined) {
try {
connect_sock = new ConnectedSocket(this_cline.host, the_port, {timeout:ob_sock_timeout, bindaddrs:server.interface_ip_addr_list});
}
catch(e) {
connect_sock = new Socket();
}
}
else {
connect_sock = new Socket();
connect_sock.bind(0,server.interface_ip_address);
connect_sock.connect(this_cline.host,the_port,ob_sock_timeout);
}
var sendts = true; /* Assume Bahamut */
......@@ -856,8 +866,15 @@ function create_new_socket(port) {
log(LOG_DEBUG,"Creating new socket object on port " + port);
if (js.global.ListeningSocket != undefined) {
newsock = new ListeningSocket(server.interface_ip_addr_list, port, "IRCd");
log(format("IRC server socket bound to TCP port " + port));
try {
newsock = new ListeningSocket(server.interface_ip_address, port, "IRCd");
log(format("IRC server socket bound to TCP port " + port));
}
catch(e) {
log(LOG_ERR,"!Error " + e + " creating listening socket on port "
+ port);
return 0;
}
}
else {
newsock = new Socket();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment