diff --git a/mesh_bot.py b/mesh_bot.py index 0e78768..ae85c63 100755 --- a/mesh_bot.py +++ b/mesh_bot.py @@ -328,7 +328,6 @@ async def start_rx(): await asyncio.sleep(0.5) for signal in [SIGINT, SIGTERM]: messageLoop.add_signal_handler(signal.SIGINT, rxLoop.cancel) - #exit_handler() pass def exit_handler(): diff --git a/modules/settings.py b/modules/settings.py index 2487438..31bf28a 100644 --- a/modules/settings.py +++ b/modules/settings.py @@ -12,6 +12,8 @@ bbs_ban_list = [] # list of banned users bbs_admin_list = [] # list of admin users repeater_channels = [] # list of channels to listen on for repeater mode antiSpam = True # anti-spam feature to prevent flooding public channel +ping_enabled = True # ping feature to respond to pings, ack's etc. +sitrep_enabled = True # sitrep feature to respond to sitreps # Read the config file, if it does not exist, create basic config file config = configparser.ConfigParser() diff --git a/modules/system.py b/modules/system.py index 849631e..55c3025 100644 --- a/modules/system.py +++ b/modules/system.py @@ -8,8 +8,20 @@ from datetime import datetime from modules.settings import * # Global Variables -trap_list = ("ping", "pinging", "ack", "testing", "test", "pong", "motd", "cmd", "lheard", "sitrep") -help_message = "CMD?: ping, motd, sitrep" +trap_list = ("cmd",) # default trap list +help_message = "CMD?:" + +# Ping Configuration +if ping_enabled: + # ping, pinging, ack, testing, test, pong + trap_list_ping = ("ping", "pinging", "ack", "testing", "test", "pong") + trap_list = trap_list + trap_list_ping + help_message = help_message + "ping" + +if sitrep_enabled: + trap_list_sitrep = ("sitrep", "lheard") + trap_list = trap_list + trap_list_sitrep + help_message = help_message + ", sitrep" # Solar Conditions Configuration if solar_conditions_enabled: diff --git a/pong_bot.py b/pong_bot.py index 6afc49f..2d5a734 100755 --- a/pong_bot.py +++ b/pong_bot.py @@ -203,7 +203,6 @@ async def start_rx(): await asyncio.sleep(0.5) for signal in [SIGINT, SIGTERM]: messageLoop.add_signal_handler(signal.SIGINT, rxLoop.cancel) - #exit_handler() pass def exit_handler():