From 987f597e07a8f49a1d5f8dd1a4a65989495ace27 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Fri, 19 Sep 2003 08:34:05 +0000
Subject: [PATCH] Proper support for js.terminated property.

---
 exec/ircd.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/exec/ircd.js b/exec/ircd.js
index fc36150f9c..63130aa1ca 100644
--- a/exec/ircd.js
+++ b/exec/ircd.js
@@ -913,6 +913,8 @@ while (!server.terminated) {
 
 	if(server.terminated)
 		break;
+	if(this.js!=undefined && js.terminated)
+		break;
 
 	// Setup a new socket if a connection is accepted.
 	for (pl in open_plines) {
@@ -3229,7 +3231,9 @@ function IRCClient_registered_commands(command, cmdline) {
 				break;
 			}
 			log("!ERROR! Shutting down the ircd as per " + this.ircnuh);
-			js.terminated = true;
+			if(this.js!=undefined)
+				js.terminated = true;
+			server.terminated = true;
 			break;
 		case "REHASH":
 			if (!((this.mode&USERMODE_OPER) &&
-- 
GitLab