Commit Graph

5 Commits

Author SHA1 Message Date
3nd3r 887482d3db Add role-based admin panel with root/admin/mod/user hierarchy
- User model: new 'role' column (root > admin > mod > user)
- End3r (id=2) set as 'root' (GOD admin)
- Admin panel modal: Users tab (search, set roles, verify, grant AI),
  Bans tab (list/unban), Mutes tab (list/unmute)
- Role-based permission checks: root can set admins, admins set mods,
  mods can kick/ban/mute/verify
- Shield icon in header (visible to mod+) opens admin panel
- Nicklist shows role icons: crown (root), swords (admin), shield (mod)
- Context menu: added Mute/Unmute action
- Live role_updated event pushes role changes to online users
- role_power hierarchy prevents privilege escalation
2026-04-12 14:39:43 -05:00
3nd3r 8cd76ff72d Add per-user conversation memory for Violet AI
- VioletHistory model: stores plaintext turns (user/assistant) per user_id
- AI worker loads last 20 turns into Ollama prompt for context
- Saves both user message and AI response after each exchange
- /reset command in Violet PM clears conversation memory
- Fix ai_limit_reached: emit ai_response event instead of raw pm_message
- ai_response handler uses correct PM room and supports plaintext text field
- Remove debug print statements
2026-04-12 13:58:44 -05:00
3nd3r 01c6c4a1b0 Fix #11: Replace deprecated datetime.utcnow with timezone-aware UTC
- Import timezone from datetime
- Add _utcnow() helper using datetime.now(timezone.utc)
- Replace all default=datetime.utcnow column defaults
- Fixes deprecation warnings on Python 3.12+
2026-04-12 13:00:03 -05:00
3nd3r 9570283ad8 Fix #10: Persist bans and mutes to database
- Add Ban and Mute models to models.py
- Load persisted bans/mutes from DB on app startup in create_app()
- Persist ban to DB on mod_ban and mod_kickban
- Persist/delete mute to DB on mod_mute toggle
- Bans and mutes now survive server restarts
2026-04-12 12:59:20 -05:00
ComputerTech ad510c57e1 Initial commit: SexyChat (Aphrodite) v1.0 2026-04-12 17:55:40 +01:00