Update blacklist.ts
This commit is contained in:
parent
e66af036a8
commit
d61898cc36
1 changed files with 3 additions and 4 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue