From cdd5f90c59a62c2a990db71306f5d1c4cc0dc177 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Fri, 3 Apr 2020 21:48:43 +0000
Subject: [PATCH] Propagate outgoing/ircclass from unreg to server/user.

---
 exec/load/ircd_server.js | 1 +
 exec/load/ircd_unreg.js  | 4 ++++
 exec/load/ircd_user.js   | 1 +
 3 files changed, 6 insertions(+)

diff --git a/exec/load/ircd_server.js b/exec/load/ircd_server.js
index 7579e9caa1..60d3f78089 100644
--- a/exec/load/ircd_server.js
+++ b/exec/load/ircd_server.js
@@ -50,6 +50,7 @@ function IRC_Server() {
 	this.parent = 0;
 	this.info = "";
 	this.idletime = time();
+	this.outgoing = false;
 	// Variables (consts, really) that point to various state information
 	this.socket = "";
 	this.type = BAHAMUT; /* Assume bahamut by default */
diff --git a/exec/load/ircd_unreg.js b/exec/load/ircd_unreg.js
index 234919a161..240946f355 100644
--- a/exec/load/ircd_unreg.js
+++ b/exec/load/ircd_unreg.js
@@ -225,6 +225,8 @@ function IRC_Unregistered_Commands(cmdline) {
 			new_server.hostname = this.hostname;
 			new_server.recvq = this.recvq;
 			new_server.sendq = this.sendq;
+			new_server.ircclass = this.ircclass;
+			new_server.outgoing = this.outgoing;
 			if (!qwk_slave) { // qwk slaves should never be hubs.
 				for (hl in HLines) {
 					if (HLines[hl].servername.toLowerCase()
@@ -393,6 +395,8 @@ function Unregistered_Welcome() {
 	new_user.ircclass = my_iline.ircclass;
 	new_user.sendq = this.sendq;
 	new_user.recvq = this.recvq;
+	// Shouldn't be a thing...
+	new_user.outgoing = this.outgoing;
 	hcc_counter++;
 	this.numeric("001", ":Welcome to the Synchronet IRC Service, " + new_user.nuh);
 	this.numeric("002", ":Your host is " + servername + ", running version " + VERSION);
diff --git a/exec/load/ircd_user.js b/exec/load/ircd_user.js
index 27900c1e03..7ae184aa93 100644
--- a/exec/load/ircd_user.js
+++ b/exec/load/ircd_user.js
@@ -148,6 +148,7 @@ function IRC_User(id) {
 	this.uprefix = "";
 	this.id = id;
 	this.throttle_count = 0;	/* Number of commands executed within 2 secs */
+	this.outgoing = false;
 	// Variables (consts, really) that point to various state information
 	this.socket = "";
 	////////// FUNCTIONS
-- 
GitLab