Commit Graph
3 Commits
Author SHA1 Message Date
nocode 783bef2438 feat(announcement): refactor announcement system with presets and improved text handling
- Add BladW namespace and module structure
- Implement LimitChars() function for UTF-8 safe string truncation
- Add Resolve() function to handle preset-based configuration merging
- Add Broadcast() function to centralize announcement distribution logic
- Update net.Receive handler to support preset system
- Add configurable announcement max length support
- Include announcement sound file registration
- Improve text validation and default values handling
2026-07-20 13:36:23 +02:00
nocode a476a2e017 feat(announcement): implement server-side announcement functions
Add server-side functionality for the announcement system:
- Add bladw_amenu console command to open admin announcement menu
- Add /bannonce and !bannonce chat commands for opening the menu
- Implement bladWSendAnnouncement net message handler to broadcast announcements
- Validate admin permissions and sanitize announcement content (title max 64 chars, text max 200 chars)
- Use default title "Annonce" if not provided
2026-07-20 12:46:46 +02:00
nocode 6cc464b145 feat(loader)!: implement glob pattern matching for module discovery
Replace simple prefix matching with full glob pattern support for discovering root folders.

Changes:
- Add EscapePattern() to escape Lua magic characters
- Add GlobToPattern() to convert glob patterns (e.g., "bladw_*") to Lua regex patterns
- Refactor FindRootFolders() to support:
  • Exact matches without wildcards (e.g., "bladw_announcement")
  • Glob patterns with * in prefix/suffix/middle positions
- Update default config root from "bladw_*" to "bladw_announcement"
- Improve documentation with usage examples
- Add new announcement module with client, server, and shared files
- Update rndx.lua library (formatting/whitespace changes)

BREAKING CHANGE: The root config now expects exact folder names or glob patterns instead of simple prefixes. Existing configs using "bladw_*" will still work but the matching behavior changes from prefix-only to glob-based pattern matching.
2026-07-01 16:00:44 +02:00