From 58deb123b9b23caa6b41dad6aed6d6d73ee9116e Mon Sep 17 00:00:00 2001 From: agessaman Date: Tue, 10 Mar 2026 10:31:39 -0700 Subject: [PATCH] Update RepeaterManager to respect auto-manage contacts configuration - Modified the RepeaterManager class to enable or disable auto-purge based on the 'auto_manage_contacts' setting from the bot's configuration. - This change allows for more flexible management of contacts, aligning with the bot's operational mode. --- modules/repeater_manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/repeater_manager.py b/modules/repeater_manager.py index f1fab17..45888c5 100644 --- a/modules/repeater_manager.py +++ b/modules/repeater_manager.py @@ -36,7 +36,9 @@ class RepeaterManager: # Initialize auto-purge monitoring self.contact_limit = 300 # MeshCore device limit (will be updated from device info) self.auto_purge_threshold = 280 # Start purging when 280+ contacts - self.auto_purge_enabled = True + # Respect auto_manage_contacts: manual mode (false) = no auto-purge; device/bot = auto-purge on + auto_manage = bot.config.get('Bot', 'auto_manage_contacts', fallback='false').lower() + self.auto_purge_enabled = (auto_manage != 'false') # Initialize companion purge settings self.companion_purge_enabled = bot.config.getboolean('Companion_Purge', 'companion_purge_enabled', fallback=False)