Commit Graph

5 Commits

Author SHA1 Message Date
Claude
be794bcbe9 Add local storage for muted players and serveradmin.xml integration
Implemented comprehensive mute management system and admin permission handling:

**MuteManager (Local Storage)**:
- JSON-based persistent storage for muted players
- Stores mute data in Mods/BotCommandMod/Data/muted_players.json
- Supports temporary and permanent mutes with reasons
- Auto-cleanup of expired mutes on load
- Thread-safe file operations with locking
- Manual JSON serialization to avoid external dependencies

**AdminPermissionManager**:
- Reads serveradmin.xml to load admin users (permission_level < 1000)
- Auto-discovery of serveradmin.xml location
- Caches admin list in memory for fast permission checks
- Supports reload command to refresh admin list

**Chat Command System**:
- Harmony patch on ChatCommandManager.ProcessCommand
- Blocks chat/commands from muted players with informative messages
- New /bot commands for admins:
  - /bot mute <player> [minutes] [reason] - Mute a player
  - /bot unmute <player> - Unmute a player
  - /bot mutelist - List all muted players
  - /bot admins - Show all loaded admins
  - /bot reload - Reload serveradmin.xml

**Build System**:
- Added System.Xml.dll and System.Xml.Linq.dll references for XML parsing

All features are fully functional and ready for testing.
2025-11-24 06:40:26 +00:00
Claude
6e856a6216 Switch from mcs to csc compiler with nostdlib
Use Roslyn compiler (csc) instead of old mcs to avoid netstandard 2.1 conflicts
2025-11-23 17:51:27 +00:00
Claude
618c3b6c35 Remove unnecessary assembly references from build script
Only reference game-specific DLLs, let Mono provide system libraries
2025-11-23 17:47:08 +00:00
Claude
8cdd933d35 Fix build script and API usage
- Add all required assembly references (mscorlib, netstandard, System.dll, System.Core.dll)
- Use GameManager.ChatMessageServer instead of NetPackageChat
- Use Log.Out (proper 7DTD API) instead of Debug.Log
2025-11-23 17:44:58 +00:00
Claude
8495249cb1 Add build script for command line compilation 2025-11-23 17:19:24 +00:00