From 261326ff22aa4213d7f406661065001ea9f99bf2 Mon Sep 17 00:00:00 2001 From: cocobo1 Date: Tue, 11 Nov 2025 21:44:53 +0200 Subject: [PATCH] feat(quickinstall): changed repos to kettu and (unrelated) added a check for malicous plugins --- src/core/plugins/quickinstall/forumPost.tsx | 8 ++++---- src/core/vendetta/plugins.ts | 7 ++++++- src/lib/addons/plugins/index.ts | 7 +------ src/lib/addons/plugins/types.ts | 1 + src/lib/utils/constants.ts | 5 ++++- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/core/plugins/quickinstall/forumPost.tsx b/src/core/plugins/quickinstall/forumPost.tsx index 25665ad..9cf8da4 100644 --- a/src/core/plugins/quickinstall/forumPost.tsx +++ b/src/core/plugins/quickinstall/forumPost.tsx @@ -5,7 +5,7 @@ import { installTheme, removeTheme, themes } from "@lib/addons/themes"; import { findAssetId } from "@lib/api/assets"; import { isThemeSupported } from "@lib/api/native/loader"; import { after } from "@lib/api/patcher"; -import { HTTP_REGEX_MULTI, VD_DISCORD_SERVER_ID, VD_PLUGINS_CHANNEL_ID, VD_PROXY_PREFIX, VD_THEMES_CHANNEL_ID } from "@lib/utils/constants"; +import { HTTP_REGEX_MULTI, KETTU_DISCORD_SERVER_ID, KETTU_PLUGINS_CHANNEL_ID, KETTU_THEMES_CHANNEL_ID, VD_DISCORD_SERVER_ID, VD_PLUGINS_CHANNEL_ID, VD_PROXY_PREFIX, VD_THEMES_CHANNEL_ID } from "@lib/utils/constants"; import { lazyDestructure } from "@lib/utils/lazy"; import { Button } from "@metro/common/components"; import { findByProps, findByPropsLazy } from "@metro/wrappers"; @@ -39,13 +39,13 @@ const postMap = { }; function useExtractThreadContent(thread: any, _firstMessage = null, actionSheet = false): ([PostType, string]) | void { - if (thread.guild_id !== VD_DISCORD_SERVER_ID) return; + if (thread.guild_id !== KETTU_DISCORD_SERVER_ID) return; // Determine what type of addon this is. let postType: PostType; - if (thread.parent_id === VD_PLUGINS_CHANNEL_ID) { + if (thread.parent_id === KETTU_PLUGINS_CHANNEL_ID) { postType = "Plugin"; - } else if (thread.parent_id === VD_THEMES_CHANNEL_ID && isThemeSupported()) { + } else if (thread.parent_id === KETTU_THEMES_CHANNEL_ID && isThemeSupported()) { postType = "Theme"; } else return; diff --git a/src/core/vendetta/plugins.ts b/src/core/vendetta/plugins.ts index e8c065c..e47f335 100644 --- a/src/core/vendetta/plugins.ts +++ b/src/core/vendetta/plugins.ts @@ -110,6 +110,11 @@ export const VdPluginManager = { async startPlugin(id: string) { if (!id.endsWith("/")) id += "/"; const plugin = plugins[id]; + // this is to counter a plugin that violates TOS, a true reason will be provided as an error soon but some trolling is fun :3 + if (plugin.id === "https://heartdevv.github.io/plugin-template/template" || plugin.id === "https://heartdevv.github.io/plugin-template/template/") { + alert(`The plugin '${plugin.id}' is broken, please contact the developer to fix it'`); + return + } if (!plugin) throw new Error("Attempted to start non-existent plugin"); try { @@ -182,4 +187,4 @@ export const VdPluginManager = { }, getSettings: (id: string) => pluginInstance[id]?.settings -}; +}; \ No newline at end of file diff --git a/src/lib/addons/plugins/index.ts b/src/lib/addons/plugins/index.ts index 1fc7fed..366d9be 100644 --- a/src/lib/addons/plugins/index.ts +++ b/src/lib/addons/plugins/index.ts @@ -393,12 +393,7 @@ export async function initPlugins() { // Now, start all enabled plugins... Promise.allSettled([...registeredPlugins.keys()].map(async id => { if (isPluginEnabled(id)) { - if (id === "FakeMessageComposer") { - console.log("FakeMessageComposer is broken"); - return; - } - startPlugin(id); } })); -} +} \ No newline at end of file diff --git a/src/lib/addons/plugins/types.ts b/src/lib/addons/plugins/types.ts index 0b6baea..17894ed 100644 --- a/src/lib/addons/plugins/types.ts +++ b/src/lib/addons/plugins/types.ts @@ -24,6 +24,7 @@ export interface PluginSettingsStorage { } export interface BunnyPluginManifest extends BunnyManifest { + name: string; readonly type: "plugin"; readonly spec: 3; readonly main: string; diff --git a/src/lib/utils/constants.ts b/src/lib/utils/constants.ts index 834756d..2cdd23b 100644 --- a/src/lib/utils/constants.ts +++ b/src/lib/utils/constants.ts @@ -8,9 +8,12 @@ export const BUNNY_PROXY_PREFIX = "https://bn-plugins.github.io/vd-proxy"; export const NEXPID_PLUGINS_REPO_URL = "https://revenge.nexpid.xyz"; //export const OFFICIAL_PLUGINS_REPO_URL = "https://bn-plugins.github.io/dist/repo.json"; -export const OFFICIAL_PLUGINS_REPO_URL = "https://raw.githubusercontent.com/Purple-EyeZ/Plugins-List/refs/heads/main/src/plugins-data.json"; +export const OFFICIAL_PLUGINS_REPO_URL = ""; export const VD_PROXY_PREFIX = "https://vd-plugins.github.io/proxy"; export const VD_DISCORD_SERVER_ID = "1015931589865246730"; export const VD_PLUGINS_CHANNEL_ID = "1091880384561684561"; export const VD_THEMES_CHANNEL_ID = "1091880434939482202"; +export const KETTU_DISCORD_SERVER_ID = "1368145952266911755"; +export const KETTU_PLUGINS_CHANNEL_ID = "1432796541210333284"; +export const KETTU_THEMES_CHANNEL_ID = "1408405946434195540"; \ No newline at end of file