From d2276845af178f689132486d520f3a1d598b5e90 Mon Sep 17 00:00:00 2001
From: cyan <>
Date: Fri, 11 Aug 2006 22:33:50 +0000
Subject: [PATCH] * More DreamForge compatibility fixes

---
 exec/load/ircd_server.js | 8 ++++----
 exec/load/ircd_user.js   | 2 ++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/exec/load/ircd_server.js b/exec/load/ircd_server.js
index 7ec734403d..facad0c74d 100644
--- a/exec/load/ircd_server.js
+++ b/exec/load/ircd_server.js
@@ -1137,21 +1137,21 @@ function IRCClient_bcast_to_servers_raw(str,type) {
 }
 
 function Server_Quit(str,suppress_bcast,is_netsplit,origin) {
-	var tmp;
-
 	if (!str)
 		str = this.nick;
 
 	if (is_netsplit) {
 		this.netsplit(str);
+		/* Fix for DreamForge's lack of NOQUIT */
+		this.bcast_to_servers_raw("SQUIT " + this.nick + " :" + str,DREAMFORGE);
 	} else if (this.local) {
+		this.netsplit(servername + " " + this.nick);
 		if (!suppress_bcast)
 			this.bcast_to_servers_raw("SQUIT " + this.nick + " :" + str);
-		this.netsplit(servername + " " + this.nick);
 	} else if (origin) {
+		this.netsplit(origin.nick + " " + this.nick);
 		if (!suppress_bcast)
 			this.bcast_to_servers_raw(":" + origin.nick + " SQUIT " + this.nick + " :" + str);
-		this.netsplit(origin.nick + " " + this.nick);
 	} else {
 		umode_notice(USERMODE_OPER,"Notice",
 			"Netspliting a server which isn't local and doesn't " +
diff --git a/exec/load/ircd_user.js b/exec/load/ircd_user.js
index fd3fdc62d8..03911c0db0 100644
--- a/exec/load/ircd_user.js
+++ b/exec/load/ircd_user.js
@@ -1487,6 +1487,8 @@ function User_Quit(str,suppress_bcast,is_netsplit,origin) {
 
 	if (!suppress_bcast)
 		this.bcast_to_servers(tmp);
+	else if (is_netsplit)
+		this.bcast_to_servers(tmp,DREAMFORGE); /* DF doesn't have NOQUIT */
 
 	if (this.local) {
 		if(server.client_remove!=undefined)
-- 
GitLab