From ed76c89ebc87d64e973a6d0862b02088970cc23c Mon Sep 17 00:00:00 2001
From: cyan <>
Date: Wed, 8 Feb 2006 20:21:22 +0000
Subject: [PATCH] * Fix a bug wherein 'QWK' servers couldn't connect to their
 uplink.   Thanks to Tracker1 and RuneMaster for pointing this one out.

---
 exec/ircd.js             | 3 ++-
 exec/load/ircd_server.js | 2 +-
 exec/load/ircd_unreg.js  | 3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/exec/ircd.js b/exec/ircd.js
index 8adc07370b..2e7dce9131 100644
--- a/exec/ircd.js
+++ b/exec/ircd.js
@@ -181,7 +181,7 @@ function parse_nline_flags(flags) {
 				nline_flags |= NLINE_CHECK_WITH_QWKMASTER;
 				break;
 			case "d":
-				nline_flags |= NLINE_IS_DREAMHAVEN;
+				nline_flags |= NLINE_IS_DREAMFORGE;
 				break;
 			default:
 				log(LOG_WARNING,"!WARNING Unknown N:Line flag '" + flags[thisflag] + "' in config.");
@@ -410,6 +410,7 @@ function connect_to_server(this_cline,the_port) {
 		next_client_id++;
 		Unregistered[new_id]=new Unregistered_Client(new_id,connect_sock);
 		Unregistered[new_id].sendps = false; // Don't do P/S pair again
+		Unregistered[new_id].outgoing = true; /* Outgoing Connection */
 	}
 	this_cline.lastconnect = time();
 }
diff --git a/exec/load/ircd_server.js b/exec/load/ircd_server.js
index a9bd365a0b..342cf4adea 100644
--- a/exec/load/ircd_server.js
+++ b/exec/load/ircd_server.js
@@ -27,7 +27,7 @@ const SERVER_REVISION = "$Revision$".split(' ')[1];
 const NLINE_CHECK_QWKPASSWD		=(1<<0);	// q
 const NLINE_IS_QWKMASTER		=(1<<1);	// w
 const NLINE_CHECK_WITH_QWKMASTER	=(1<<2);	// k
-const NLINE_IS_DREAMHAVEN		=(1<<3);	// d
+const NLINE_IS_DREAMFORGE		=(1<<3);	// d
 
 ////////// Objects //////////
 function IRC_Server() {
diff --git a/exec/load/ircd_unreg.js b/exec/load/ircd_unreg.js
index 0c2ea77249..4b0b95b4d7 100644
--- a/exec/load/ircd_unreg.js
+++ b/exec/load/ircd_unreg.js
@@ -42,6 +42,7 @@ function Unregistered_Client(id,socket) {
 	this.pending_resolve = false;
 	this.pending_resolve_time = time();
 	this.sendps = true; // Send the PASS/SERVER pair by default.
+	this.outgoing = false; /* We're an incoming connection by default */
 	// Variables (consts, really) that point to various state information
 	this.socket = socket;
 	////////// FUNCTIONS
@@ -200,7 +201,7 @@ function Unregistered_Commands() {
 			if ( (!this_nline ||
 			      ( (this_nline.password == "*") && 
 				!(this_nline.flags&NLINE_CHECK_QWKPASSWD) )
-			     ) && !qwk_slave) {
+			     ) && !qwk_slave && !this.outgoing) {
 				this.quit("Server not configured.");
 				return 0;
 			}
-- 
GitLab