From d56c48a0b316d560e72e54b645df8356a37fa743 Mon Sep 17 00:00:00 2001 From: openhands Date: Sat, 18 Jul 2026 14:29:37 +0200 Subject: [PATCH] Clean up plugins: keep only optional extensions, remove core features Removed plugins that were core CMS features (News, Shop, Catalog, Social, Moderation, Security, Permissions, Bans, Teams, RCON, Audit, Email, Maintenance, Rooms). Kept only toggleable optional extensions: - Games, Radio, Notifications, Analytics, SEO, API & Integrations - Events & Polls, Support Tickets, VPN Detection, Translation Tools --- src/lib/plugins/loader.ts | 28 ---------------------------- src/plugins/audit/index.ts | 20 -------------------- src/plugins/bans/index.ts | 19 ------------------- src/plugins/catalog/index.ts | 18 ------------------ src/plugins/email/index.ts | 20 -------------------- src/plugins/maintenance/index.ts | 19 ------------------- src/plugins/moderation/index.ts | 32 -------------------------------- src/plugins/news/index.ts | 18 ------------------ src/plugins/permissions/index.ts | 18 ------------------ src/plugins/rcon/index.ts | 19 ------------------- src/plugins/rooms/index.ts | 19 ------------------- src/plugins/security/index.ts | 20 -------------------- src/plugins/shop/index.ts | 19 ------------------- src/plugins/social/index.ts | 20 -------------------- src/plugins/teams/index.ts | 19 ------------------- 15 files changed, 308 deletions(-) delete mode 100644 src/plugins/audit/index.ts delete mode 100644 src/plugins/bans/index.ts delete mode 100644 src/plugins/catalog/index.ts delete mode 100644 src/plugins/email/index.ts delete mode 100644 src/plugins/maintenance/index.ts delete mode 100644 src/plugins/moderation/index.ts delete mode 100644 src/plugins/news/index.ts delete mode 100644 src/plugins/permissions/index.ts delete mode 100644 src/plugins/rcon/index.ts delete mode 100644 src/plugins/rooms/index.ts delete mode 100644 src/plugins/security/index.ts delete mode 100644 src/plugins/shop/index.ts delete mode 100644 src/plugins/social/index.ts delete mode 100644 src/plugins/teams/index.ts diff --git a/src/lib/plugins/loader.ts b/src/lib/plugins/loader.ts index 118bd483..088373ec 100644 --- a/src/lib/plugins/loader.ts +++ b/src/lib/plugins/loader.ts @@ -2,51 +2,23 @@ import { pluginRegistry } from "./registry"; import gamesPlugin from "@/plugins/games"; import radioPlugin from "@/plugins/radio"; import notificationsPlugin from "@/plugins/notifications"; -import moderationPlugin from "@/plugins/moderation"; -import newsPlugin from "@/plugins/news"; -import shopPlugin from "@/plugins/shop"; -import catalogPlugin from "@/plugins/catalog"; import analyticsPlugin from "@/plugins/analytics"; -import socialPlugin from "@/plugins/social"; import seoPlugin from "@/plugins/seo"; -import securityPlugin from "@/plugins/security"; import apiPlugin from "@/plugins/api"; import eventsPlugin from "@/plugins/events"; import ticketsPlugin from "@/plugins/tickets"; -import bansPlugin from "@/plugins/bans"; import vpnPlugin from "@/plugins/vpn"; -import permissionsPlugin from "@/plugins/permissions"; -import teamsPlugin from "@/plugins/teams"; -import rconPlugin from "@/plugins/rcon"; -import auditPlugin from "@/plugins/audit"; -import emailPlugin from "@/plugins/email"; -import maintenancePlugin from "@/plugins/maintenance"; -import roomsPlugin from "@/plugins/rooms"; import translationsPlugin from "@/plugins/translations"; pluginRegistry.register(gamesPlugin); pluginRegistry.register(radioPlugin); pluginRegistry.register(notificationsPlugin); -pluginRegistry.register(moderationPlugin); -pluginRegistry.register(newsPlugin); -pluginRegistry.register(shopPlugin); -pluginRegistry.register(catalogPlugin); pluginRegistry.register(analyticsPlugin); -pluginRegistry.register(socialPlugin); pluginRegistry.register(seoPlugin); -pluginRegistry.register(securityPlugin); pluginRegistry.register(apiPlugin); pluginRegistry.register(eventsPlugin); pluginRegistry.register(ticketsPlugin); -pluginRegistry.register(bansPlugin); pluginRegistry.register(vpnPlugin); -pluginRegistry.register(permissionsPlugin); -pluginRegistry.register(teamsPlugin); -pluginRegistry.register(rconPlugin); -pluginRegistry.register(auditPlugin); -pluginRegistry.register(emailPlugin); -pluginRegistry.register(maintenancePlugin); -pluginRegistry.register(roomsPlugin); pluginRegistry.register(translationsPlugin); export function ensurePluginsLoaded(): void { diff --git a/src/plugins/audit/index.ts b/src/plugins/audit/index.ts deleted file mode 100644 index 6c30446f..00000000 --- a/src/plugins/audit/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { ClipboardList } from "lucide-react"; -import type { PluginDefinition } from "@/lib/plugins"; - -const plugin: PluginDefinition = { - id: "audit", - name: "Audit & Housekeeping", - description: "Audit logs, staff action logging, trade logs, chat logs and command logs", - version: "1.0.0", - enabled: true, - configFields: [ - { key: "log_staff_actions", label: "Log staff actions", type: "boolean", default: true }, - { key: "log_trades", label: "Log trades", type: "boolean", default: true }, - { key: "log_chat", label: "Log room chat", type: "boolean", default: true }, - { key: "log_commands", label: "Log player commands", type: "boolean", default: true }, - { key: "retention_days", label: "Log retention (days)", type: "text", default: "90" }, - { key: "min_rank_to_view_logs", label: "Min rank to view logs", type: "text", default: "6" }, - ], -}; - -export default plugin; diff --git a/src/plugins/bans/index.ts b/src/plugins/bans/index.ts deleted file mode 100644 index 9ed61fea..00000000 --- a/src/plugins/bans/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Ban } from "lucide-react"; -import type { PluginDefinition } from "@/lib/plugins"; - -const plugin: PluginDefinition = { - id: "bans", - name: "Bans & IP Management", - description: "User bans, IP bans, machine bans and IP address management", - version: "1.0.0", - enabled: true, - configFields: [ - { key: "enable_ip_bans", label: "Enable IP bans", type: "boolean", default: true }, - { key: "enable_machine_bans", label: "Enable machine (HWID) bans", type: "boolean", default: true }, - { key: "ban_appeal_enabled", label: "Enable ban appeals", type: "boolean", default: false }, - { key: "max_bans_per_ip", label: "Max bans before permanent", type: "text", default: "3" }, - { key: "auto_ban_duration_days", label: "Auto-ban duration (days)", type: "text", default: "7" }, - ], -}; - -export default plugin; diff --git a/src/plugins/catalog/index.ts b/src/plugins/catalog/index.ts deleted file mode 100644 index f75a5f9a..00000000 --- a/src/plugins/catalog/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Store } from "lucide-react"; -import type { PluginDefinition } from "@/lib/plugins"; - -const plugin: PluginDefinition = { - id: "catalog", - name: "Catalog & Rares", - description: "Furniture catalog, rare values, badges, achievements and sounds", - version: "1.0.0", - enabled: true, - configFields: [ - { key: "enable_rares", label: "Enable rare values page", type: "boolean", default: true }, - { key: "enable_badges", label: "Enable badge catalog", type: "boolean", default: true }, - { key: "enable_draw_badge", label: "Enable badge drawing tool", type: "boolean", default: true }, - { key: "rares_update_interval", label: "Rares auto-update interval (hours)", type: "text", default: "6" }, - ], -}; - -export default plugin; diff --git a/src/plugins/email/index.ts b/src/plugins/email/index.ts deleted file mode 100644 index 264a2565..00000000 --- a/src/plugins/email/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Mail } from "lucide-react"; -import type { PluginDefinition } from "@/lib/plugins"; - -const plugin: PluginDefinition = { - id: "email", - name: "Email & Templates", - description: "Email templates, SMTP configuration, password reset emails and notifications", - version: "1.0.0", - enabled: true, - configFields: [ - { key: "enable_email", label: "Enable email system", type: "boolean", default: true }, - { key: "smtp_host", label: "SMTP host", type: "text", default: "" }, - { key: "smtp_port", label: "SMTP port", type: "text", default: "587" }, - { key: "smtp_encryption", label: "SMTP encryption", type: "select", options: [{ label: "TLS", value: "tls" }, { label: "SSL", value: "ssl" }, { label: "None", value: "none" }], default: "tls" }, - { key: "from_address", label: "From address", type: "text", default: "noreply@atomcms.com" }, - { key: "enable_password_reset", label: "Enable password reset emails", type: "boolean", default: true }, - ], -}; - -export default plugin; diff --git a/src/plugins/maintenance/index.ts b/src/plugins/maintenance/index.ts deleted file mode 100644 index 946a3a47..00000000 --- a/src/plugins/maintenance/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Wrench } from "lucide-react"; -import type { PluginDefinition } from "@/lib/plugins"; - -const plugin: PluginDefinition = { - id: "maintenance", - name: "Maintenance & System", - description: "Maintenance mode, favicon, emulator config sync and system health", - version: "1.0.0", - enabled: true, - configFields: [ - { key: "enable_maintenance", label: "Enable maintenance mode toggle", type: "boolean", default: true }, - { key: "enable_favicon", label: "Enable favicon manager", type: "boolean", default: true }, - { key: "enable_emulator_sync", label: "Enable emulator config sync", type: "boolean", default: true }, - { key: "maintenance_message", label: "Default maintenance message", type: "text", default: "We are currently undergoing maintenance. Check back soon!" }, - { key: "allowed_ips_during_maintenance", label: "Allowed IPs during maintenance", type: "text", default: "" }, - ], -}; - -export default plugin; diff --git a/src/plugins/moderation/index.ts b/src/plugins/moderation/index.ts deleted file mode 100644 index f584b6d9..00000000 --- a/src/plugins/moderation/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Gavel } from "lucide-react"; -import type { PluginDefinition } from "@/lib/plugins"; - -const moderationPlugin: PluginDefinition = { - id: "moderation", - name: "Moderation Tools", - description: "CFH management, chat monitoring, word filter and sanction system", - version: "1.0.0", - enabled: true, - configFields: [ - { - key: "auto_assign_tickets", - label: "Auto-assign CFH tickets to online mods", - type: "boolean", - default: true, - }, - { - key: "max_tickets_per_user", - label: "Max open tickets per user", - type: "text", - default: "3", - }, - { - key: "log_chat", - label: "Log all public room chat", - type: "boolean", - default: true, - }, - ], -}; - -export default moderationPlugin; diff --git a/src/plugins/news/index.ts b/src/plugins/news/index.ts deleted file mode 100644 index 47b6c2cd..00000000 --- a/src/plugins/news/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Newspaper } from "lucide-react"; -import type { PluginDefinition } from "@/lib/plugins"; - -const plugin: PluginDefinition = { - id: "news", - name: "News & Media", - description: "News articles, photo gallery, banners, advertisements and media library", - version: "1.0.0", - enabled: true, - configFields: [ - { key: "articles_per_page", label: "Articles per page", type: "text", default: "12" }, - { key: "enable_comments", label: "Enable article comments", type: "boolean", default: true }, - { key: "enable_reactions", label: "Enable article reactions", type: "boolean", default: true }, - { key: "auto_approve_photos", label: "Auto-approve user photos", type: "boolean", default: false }, - ], -}; - -export default plugin; diff --git a/src/plugins/permissions/index.ts b/src/plugins/permissions/index.ts deleted file mode 100644 index 98d6be1c..00000000 --- a/src/plugins/permissions/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Key } from "lucide-react"; -import type { PluginDefinition } from "@/lib/plugins"; - -const plugin: PluginDefinition = { - id: "permissions", - name: "Permissions & Ranks", - description: "Rank management, permission ACLs, staff levels and role-based access control", - version: "1.0.0", - enabled: true, - configFields: [ - { key: "enable_custom_ranks", label: "Enable custom rank creation", type: "boolean", default: true }, - { key: "log_permission_changes", label: "Log permission changes", type: "boolean", default: true }, - { key: "min_rank_to_manage_perms", label: "Minimum rank to manage permissions", type: "text", default: "7" }, - { key: "enable_rank_inheritance", label: "Enable rank permission inheritance", type: "boolean", default: true }, - ], -}; - -export default plugin; diff --git a/src/plugins/rcon/index.ts b/src/plugins/rcon/index.ts deleted file mode 100644 index c74c8bbb..00000000 --- a/src/plugins/rcon/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Terminal } from "lucide-react"; -import type { PluginDefinition } from "@/lib/plugins"; - -const plugin: PluginDefinition = { - id: "rcon", - name: "RCON Command Center", - description: "Remote console, emulator commands, room management and server tools", - version: "1.0.0", - enabled: true, - configFields: [ - { key: "enable_rcon", label: "Enable RCON", type: "boolean", default: true }, - { key: "enable_command_center", label: "Enable command center UI", type: "boolean", default: true }, - { key: "log_commands", label: "Log all RCON commands", type: "boolean", default: true }, - { key: "min_rank_to_use", label: "Minimum rank to use RCON", type: "text", default: "7" }, - { key: "command_timeout_ms", label: "Command timeout (ms)", type: "text", default: "5000" }, - ], -}; - -export default plugin; diff --git a/src/plugins/rooms/index.ts b/src/plugins/rooms/index.ts deleted file mode 100644 index 398c851d..00000000 --- a/src/plugins/rooms/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { DoorOpen } from "lucide-react"; -import type { PluginDefinition } from "@/lib/plugins"; - -const plugin: PluginDefinition = { - id: "rooms", - name: "Room Management", - description: "Room listing, room search, room moderation and room import/export", - version: "1.0.0", - enabled: true, - configFields: [ - { key: "enable_room_listing", label: "Enable room listing page", type: "boolean", default: true }, - { key: "enable_room_search", label: "Enable room search", type: "boolean", default: true }, - { key: "enable_room_moderation", label: "Enable room moderation tools", type: "boolean", default: true }, - { key: "rooms_per_page", label: "Rooms per page", type: "text", default: "20" }, - { key: "min_rank_to_moderate_rooms", label: "Min rank to moderate rooms", type: "text", default: "5" }, - ], -}; - -export default plugin; diff --git a/src/plugins/security/index.ts b/src/plugins/security/index.ts deleted file mode 100644 index 1803b6ca..00000000 --- a/src/plugins/security/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Shield } from "lucide-react"; -import type { PluginDefinition } from "@/lib/plugins"; - -const plugin: PluginDefinition = { - id: "security", - name: "Security & Access", - description: "IP blacklist/whitelist, VPN detection, word filter, ban system and permission ACLs", - version: "1.0.0", - enabled: true, - configFields: [ - { key: "enable_vpn_detection", label: "Enable VPN/proxy detection", type: "boolean", default: true }, - { key: "enable_ip_whitelist", label: "Enable IP whitelist", type: "boolean", default: false }, - { key: "enable_word_filter", label: "Enable word filter", type: "boolean", default: true }, - { key: "max_login_attempts", label: "Max login attempts before ban", type: "text", default: "5" }, - { key: "lockout_duration_minutes", label: "Account lockout duration (minutes)", type: "text", default: "15" }, - { key: "enforce_2fa_staff", label: "Require 2FA for staff", type: "boolean", default: true }, - ], -}; - -export default plugin; diff --git a/src/plugins/shop/index.ts b/src/plugins/shop/index.ts deleted file mode 100644 index aa811119..00000000 --- a/src/plugins/shop/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ShoppingCart } from "lucide-react"; -import type { PluginDefinition } from "@/lib/plugins"; - -const plugin: PluginDefinition = { - id: "shop", - name: "Shop & Payments", - description: "Web shop, PayPal top-up, vouchers, subscriptions and calendar rewards", - version: "1.0.0", - enabled: true, - configFields: [ - { key: "enable_paypal", label: "Enable PayPal payments", type: "boolean", default: true }, - { key: "enable_vouchers", label: "Enable voucher codes", type: "boolean", default: true }, - { key: "enable_subscriptions", label: "Enable recurring subscriptions", type: "boolean", default: false }, - { key: "currency_symbol", label: "Currency symbol", type: "text", default: "€" }, - { key: "min_topup_amount", label: "Minimum top-up amount", type: "text", default: "1" }, - ], -}; - -export default plugin; diff --git a/src/plugins/social/index.ts b/src/plugins/social/index.ts deleted file mode 100644 index d6dde1d6..00000000 --- a/src/plugins/social/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Users } from "lucide-react"; -import type { PluginDefinition } from "@/lib/plugins"; - -const plugin: PluginDefinition = { - id: "social", - name: "Social Features", - description: "Friends list, messaging, guilds, user profiles, guestbook and referrals", - version: "1.0.0", - enabled: true, - configFields: [ - { key: "enable_friends", label: "Enable friends system", type: "boolean", default: true }, - { key: "enable_messages", label: "Enable private messages", type: "boolean", default: true }, - { key: "enable_guilds", label: "Enable guilds", type: "boolean", default: true }, - { key: "enable_guestbook", label: "Enable profile guestbook", type: "boolean", default: true }, - { key: "enable_referrals", label: "Enable referral system", type: "boolean", default: true }, - { key: "max_friends", label: "Max friends per user", type: "text", default: "300" }, - ], -}; - -export default plugin; diff --git a/src/plugins/teams/index.ts b/src/plugins/teams/index.ts deleted file mode 100644 index b3fe23ee..00000000 --- a/src/plugins/teams/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Users } from "lucide-react"; -import type { PluginDefinition } from "@/lib/plugins"; - -const plugin: PluginDefinition = { - id: "teams", - name: "Applications & Teams", - description: "Staff applications, team management and recruitment system", - version: "1.0.0", - enabled: true, - configFields: [ - { key: "enable_applications", label: "Enable staff applications", type: "boolean", default: true }, - { key: "enable_teams", label: "Enable team pages", type: "boolean", default: true }, - { key: "min_age_days", label: "Minimum account age to apply (days)", type: "text", default: "30" }, - { key: "auto_reject_after_days", label: "Auto-reject after (days)", type: "text", default: "14" }, - { key: "max_open_applications", label: "Max open applications per user", type: "text", default: "1" }, - ], -}; - -export default plugin;