Fix channel validation by saving activity tracking immediately
- Activity tracking now saves to database immediately when commands are processed - This ensures validate_target_player can see recent activity for channel membership checks
This commit is contained in:
@@ -344,6 +344,8 @@ class DuckHuntBot:
|
|||||||
if channel.startswith('#'): # Only track for channel messages
|
if channel.startswith('#'): # Only track for channel messages
|
||||||
player['last_activity_channel'] = channel
|
player['last_activity_channel'] = channel
|
||||||
player['last_activity_time'] = time.time()
|
player['last_activity_time'] = time.time()
|
||||||
|
# Save activity immediately to ensure validation works
|
||||||
|
self.db.players[nick.lower()] = player
|
||||||
|
|
||||||
# Check if player is ignored (unless it's an admin)
|
# Check if player is ignored (unless it's an admin)
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user