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.
This commit is contained in:
agessaman committed 2026-03-10 10:31:39 -07:00
1 parent 8b363afed7
commit 58deb123b9
1 file changed
+3 -1
+3 -1
View File
@@ -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)