Fix incorrect use of Array.splice

This should resolve the sync loops for bans and admins
This commit is contained in:
Cooldude2606 committed 2025-04-06 18:06:05 +01:00
1 parent ce85149b4c
commit 916c48844a
1 file changed
+1 -1
+1 -1
View File
@@ -1036,7 +1036,7 @@ end`.replace(/\r?\n/g, " ");
expected => expected.name === name && expected.action === action && expected.reason === reason
);
if (expectedIndex >= 0) {
this._expectedUserUpdates = this._expectedUserUpdates.splice(expectedIndex, 1);
this._expectedUserUpdates.splice(expectedIndex, 1);
} else if (action === "BAN") {
if (this.config.get("factorio.sync_banlist") !== "bidirectional") { return; }
this.sendTo(addr, new lib.InstanceBanlistUpdateEvent(name, true, reason ?? ""));