From bbdc94870ae309f135661b14fc1879315c5fcf70 Mon Sep 17 00:00:00 2001 From: openhands Date: Sat, 18 Jul 2026 14:26:03 +0200 Subject: [PATCH] Add 12 more plugins (Events, Tickets, Bans, VPN, Permissions, Teams, RCON, Audit, Email, Maintenance, Rooms, Translations) Total: 24 plugins now registered and visible in the Plugins hub admin panel. --- src/lib/plugins/loader.ts | 24 ++++++++++++++++++++++++ src/plugins/audit/index.ts | 20 ++++++++++++++++++++ src/plugins/bans/index.ts | 19 +++++++++++++++++++ src/plugins/email/index.ts | 20 ++++++++++++++++++++ src/plugins/events/index.ts | 19 +++++++++++++++++++ src/plugins/maintenance/index.ts | 19 +++++++++++++++++++ src/plugins/permissions/index.ts | 18 ++++++++++++++++++ src/plugins/rcon/index.ts | 19 +++++++++++++++++++ src/plugins/rooms/index.ts | 19 +++++++++++++++++++ src/plugins/teams/index.ts | 19 +++++++++++++++++++ src/plugins/tickets/index.ts | 19 +++++++++++++++++++ src/plugins/translations/index.ts | 19 +++++++++++++++++++ src/plugins/vpn/index.ts | 20 ++++++++++++++++++++ 13 files changed, 254 insertions(+) create mode 100644 src/plugins/audit/index.ts create mode 100644 src/plugins/bans/index.ts create mode 100644 src/plugins/email/index.ts create mode 100644 src/plugins/events/index.ts create mode 100644 src/plugins/maintenance/index.ts create mode 100644 src/plugins/permissions/index.ts create mode 100644 src/plugins/rcon/index.ts create mode 100644 src/plugins/rooms/index.ts create mode 100644 src/plugins/teams/index.ts create mode 100644 src/plugins/tickets/index.ts create mode 100644 src/plugins/translations/index.ts create mode 100644 src/plugins/vpn/index.ts diff --git a/src/lib/plugins/loader.ts b/src/lib/plugins/loader.ts index 90043d6b..118bd483 100644 --- a/src/lib/plugins/loader.ts +++ b/src/lib/plugins/loader.ts @@ -11,6 +11,18 @@ 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); @@ -24,6 +36,18 @@ 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 { // Plugins registered at import time diff --git a/src/plugins/audit/index.ts b/src/plugins/audit/index.ts new file mode 100644 index 00000000..6c30446f --- /dev/null +++ b/src/plugins/audit/index.ts @@ -0,0 +1,20 @@ +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 new file mode 100644 index 00000000..9ed61fea --- /dev/null +++ b/src/plugins/bans/index.ts @@ -0,0 +1,19 @@ +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/email/index.ts b/src/plugins/email/index.ts new file mode 100644 index 00000000..264a2565 --- /dev/null +++ b/src/plugins/email/index.ts @@ -0,0 +1,20 @@ +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/events/index.ts b/src/plugins/events/index.ts new file mode 100644 index 00000000..0c504d38 --- /dev/null +++ b/src/plugins/events/index.ts @@ -0,0 +1,19 @@ +import { Calendar } from "lucide-react"; +import type { PluginDefinition } from "@/lib/plugins"; + +const plugin: PluginDefinition = { + id: "events", + name: "Events & Polls", + description: "Hotel events, calendar, polls and giveaways", + version: "1.0.0", + enabled: true, + configFields: [ + { key: "enable_events", label: "Enable hotel events", type: "boolean", default: true }, + { key: "enable_polls", label: "Enable polls", type: "boolean", default: true }, + { key: "enable_calendar", label: "Enable calendar", type: "boolean", default: true }, + { key: "auto_approve_events", label: "Auto-approve user-submitted events", type: "boolean", default: false }, + { key: "max_events_per_page", label: "Events per page", type: "text", default: "12" }, + ], +}; + +export default plugin; diff --git a/src/plugins/maintenance/index.ts b/src/plugins/maintenance/index.ts new file mode 100644 index 00000000..946a3a47 --- /dev/null +++ b/src/plugins/maintenance/index.ts @@ -0,0 +1,19 @@ +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/permissions/index.ts b/src/plugins/permissions/index.ts new file mode 100644 index 00000000..98d6be1c --- /dev/null +++ b/src/plugins/permissions/index.ts @@ -0,0 +1,18 @@ +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 new file mode 100644 index 00000000..c74c8bbb --- /dev/null +++ b/src/plugins/rcon/index.ts @@ -0,0 +1,19 @@ +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 new file mode 100644 index 00000000..398c851d --- /dev/null +++ b/src/plugins/rooms/index.ts @@ -0,0 +1,19 @@ +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/teams/index.ts b/src/plugins/teams/index.ts new file mode 100644 index 00000000..b3fe23ee --- /dev/null +++ b/src/plugins/teams/index.ts @@ -0,0 +1,19 @@ +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; diff --git a/src/plugins/tickets/index.ts b/src/plugins/tickets/index.ts new file mode 100644 index 00000000..abfb0d67 --- /dev/null +++ b/src/plugins/tickets/index.ts @@ -0,0 +1,19 @@ +import { Ticket } from "lucide-react"; +import type { PluginDefinition } from "@/lib/plugins"; + +const plugin: PluginDefinition = { + id: "tickets", + name: "Support Tickets", + description: "Help center, support tickets, FAQ and contact forms", + version: "1.0.0", + enabled: true, + configFields: [ + { key: "enable_tickets", label: "Enable support tickets", type: "boolean", default: true }, + { key: "enable_faq", label: "Enable FAQ/help center", type: "boolean", default: true }, + { key: "auto_assign", label: "Auto-assign tickets to staff", type: "boolean", default: true }, + { key: "max_tickets_per_user", label: "Max open tickets per user", type: "text", default: "5" }, + { key: "response_timeout_hours", label: "Response timeout (hours)", type: "text", default: "72" }, + ], +}; + +export default plugin; diff --git a/src/plugins/translations/index.ts b/src/plugins/translations/index.ts new file mode 100644 index 00000000..c5a86c95 --- /dev/null +++ b/src/plugins/translations/index.ts @@ -0,0 +1,19 @@ +import { Languages } from "lucide-react"; +import type { PluginDefinition } from "@/lib/plugins"; + +const plugin: PluginDefinition = { + id: "translations", + name: "Translation Tools", + description: "Multi-language CMS translations, import/export and i18n management", + version: "1.0.0", + enabled: true, + configFields: [ + { key: "enable_translations", label: "Enable translation editor", type: "boolean", default: true }, + { key: "enable_import_export", label: "Enable translation import/export", type: "boolean", default: true }, + { key: "default_language", label: "Default language", type: "text", default: "en" }, + { key: "supported_languages", label: "Supported languages (comma-separated)", type: "text", default: "en,nl,fr,de,es" }, + { key: "enable_auto_translate", label: "Enable auto-translate suggestions", type: "boolean", default: false }, + ], +}; + +export default plugin; diff --git a/src/plugins/vpn/index.ts b/src/plugins/vpn/index.ts new file mode 100644 index 00000000..b8d8edfd --- /dev/null +++ b/src/plugins/vpn/index.ts @@ -0,0 +1,20 @@ +import { ShieldAlert } from "lucide-react"; +import type { PluginDefinition } from "@/lib/plugins"; + +const plugin: PluginDefinition = { + id: "vpn", + name: "VPN & Proxy Detection", + description: "VPN, proxy and TOR detection for registration and login security", + version: "1.0.0", + enabled: true, + configFields: [ + { key: "block_vpn", label: "Block VPN registrations", type: "boolean", default: true }, + { key: "block_proxy", label: "Block proxy registrations", type: "boolean", default: true }, + { key: "block_tor", label: "Block TOR exit nodes", type: "boolean", default: true }, + { key: "block_on_login", label: "Block VPN users on login", type: "boolean", default: false }, + { key: "api_key", label: "Detection API key", type: "text", default: "" }, + { key: "cache_results_minutes", label: "Cache results (minutes)", type: "text", default: "60" }, + ], +}; + +export default plugin;