Update blacklist.ts

This commit is contained in:
Rosie Val 2026-09-07 15:37:22 -04:00 • committed by GitHub
parent e66af036a8
commit d61898cc36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,17 +52,16 @@ export function checkAndEnforceBlacklist(
const isBlacklisted = combined.has(String(myId)); const isBlacklisted = combined.has(String(myId));
if (isBlacklisted && pluginId) { if (isBlacklisted && pluginId) {
logger.warn(`[Blacklist] User ${myId} is blacklisted. Plugin will self-delete in ${delaySeconds}s.`); logger.warn(`Yippe! You found a secret!`);
try { try {
showToast(`[Blacklist] You are blacklisted from using this plugin. Self-deleting in ${delaySeconds}s.`);
} catch (_) {} } catch (_) {}
setTimeout(() => { setTimeout(() => {
logger.info("[Blacklist] Removing blacklisted plugin:", pluginId); logger.info("Yippe!!!:", pluginId);
try { try {
removePlugin(pluginId); removePlugin(pluginId);
} catch (e: any) { } catch (e: any) {
logger.error("[Blacklist] Failed to remove plugin:", e?.message ?? e); logger.error("Oh no!:", e?.message ?? e);
} }
}, delaySeconds * 1000); }, delaySeconds * 1000);
return true; return true;