From 6b10fdc41196c5cdd1fe29199a5ff831197a5eb5 Mon Sep 17 00:00:00 2001
From: Randy Sommerfeld <cyan@synchro.net>
Date: Mon, 3 Jan 2022 08:43:18 +0700
Subject: [PATCH] Ignore malformed I:lines

---
 exec/load/ircd/config.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/exec/load/ircd/config.js b/exec/load/ircd/config.js
index 5d5e38309a..ac3f2d6c4d 100644
--- a/exec/load/ircd/config.js
+++ b/exec/load/ircd/config.js
@@ -354,10 +354,9 @@ function read_conf_config(conf) {
 					HLines.push(new HLine(arg[1],arg[3]));
 					break;
 				case "I":
-					if (!arg[5])
+					if (!arg[5] || !parseInt(arg[5]))
 						break;
-					ILines.push(new ILine(arg[1],arg[2],arg[3],arg[4],
-						arg[5]));
+					ILines.push(new ILine(arg[1],arg[2],arg[3],arg[4],parseInt(arg[5])));
 					break;
 				case "K":
 					if (!arg[2])
-- 
GitLab