Rename forceload.ts
This commit is contained in:
parent
937082694e
commit
e5fb941bb7
|
@ -14,9 +14,15 @@ const logger = new Logger("Channel Forceloader");
|
||||||
*/
|
*/
|
||||||
export function forceloadChannel(id: string) {
|
export function forceloadChannel(id: string) {
|
||||||
try {
|
try {
|
||||||
|
const existing = ChannelList.getChannel(id);
|
||||||
|
if (existing) {
|
||||||
|
logger.info("Keeping", id, "forceloaded");
|
||||||
|
existing.setForceload(true);
|
||||||
|
} else {
|
||||||
logger.info("Forceloading", id);
|
logger.info("Forceloading", id);
|
||||||
new Channel(id, undefined, undefined, undefined, true);
|
new Channel(id, undefined, undefined, undefined, true);
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
// If you don't load the server first, bun will literally segfault
|
// If you don't load the server first, bun will literally segfault
|
||||||
import "./ws/server";
|
import "./ws/server";
|
||||||
import { loadForcedStartupChannels } from "./channel/forceLoad";
|
import { loadForcedStartupChannels } from "./channel/forceload";
|
||||||
import { Logger } from "./util/Logger";
|
import { Logger } from "./util/Logger";
|
||||||
// docker hates this next one
|
// docker hates this next one
|
||||||
import { startReadline } from "./util/readline";
|
import { startReadline } from "./util/readline";
|
||||||
|
|
Loading…
Reference in New Issue