From 0684fea1ee2b8e65192633cf999be175ccf3ebf7 Mon Sep 17 00:00:00 2001 From: octycs Date: Tue, 22 Dec 2020 21:08:50 +0100 Subject: [PATCH] Fix schedule, even uglier code --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index dd40f0a..f08a5fc 100644 --- a/index.js +++ b/index.js @@ -58,7 +58,10 @@ function parse_schedule() { title: fahrplan[i].title, sub: fahrplan[i].start + " D" + fahrplan[i].day + " @ " + fahrplan[i].room + ", " + fahrplan[i].personnames, }); - } else if (fahrplan_parsed.other.length < n_other) { + } else if (fahrplan_parsed.other.length < n_other + && fahrplan[i].roomguid != channel_here && fahrplan[i].room != channel_here + && fahrplan[i].roomguid != channel_main_1 && fahrplan[i].room != channel_main_1 + && fahrplan[i].roomguid != channel_main_2 && fahrplan[i].room != channel_main_2) { fahrplan_parsed.other.push({ title: fahrplan[i].title, sub: fahrplan[i].start + " D" + fahrplan[i].day + " @ " + fahrplan[i].room,