Rename forceload.ts

This commit is contained in:
Hri7566 2024-09-19 20:27:36 -04:00
parent 937082694e
commit e5fb941bb7
2 changed files with 10 additions and 4 deletions

View File

@ -14,9 +14,15 @@ const logger = new Logger("Channel Forceloader");
*/
export function forceloadChannel(id: string) {
try {
const existing = ChannelList.getChannel(id);
if (existing) {
logger.info("Keeping", id, "forceloaded");
existing.setForceload(true);
} else {
logger.info("Forceloading", id);
new Channel(id, undefined, undefined, undefined, true);
return true;
}
} catch (err) {
return false;
}

View File

@ -15,7 +15,7 @@
// If you don't load the server first, bun will literally segfault
import "./ws/server";
import { loadForcedStartupChannels } from "./channel/forceLoad";
import { loadForcedStartupChannels } from "./channel/forceload";
import { Logger } from "./util/Logger";
// docker hates this next one
import { startReadline } from "./util/readline";