From dcec7d94b1b190683dad5c5b81903833704f8c75 Mon Sep 17 00:00:00 2001 From: Blergo Date: Wed, 3 Jul 2024 14:18:35 +0100 Subject: [PATCH] Update command_handlers.py disable features from config.ini --- command_handlers.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/command_handlers.py b/command_handlers.py index 0eadf2d..f791280 100644 --- a/command_handlers.py +++ b/command_handlers.py @@ -37,16 +37,21 @@ def handle_exit_command(sender_id, interface): def handle_help_command(sender_id, interface, state=None): title = "█▓▒░ Yorkshire BBS ░▒▓█\n\n" - commands = [ - "[M]ail", - "[B]ulletin", - "[S]tats", - #"[F]ortune", - #"[W]all of Shame", - #"[C]hannel Directory", - #"EXIT: Exit current menu", - "[H]elp" - ] + commands = [] + if mail in interface.disabled == False: + commands.append("[M]ail") + if bulletin in interface.disabled == False: + commands.append("[B]ulletin") + if stats in interface.disabled == False: + commands.append("[S]tats") + if fortune in interface.disabled == False: + commands.append("[F]ortune") + if wos in interface.disabled == False: + commands.append("[W]all of Shame") + if channel in interface.disabled == False: + commands.append("[C]hannel Directory") + commands.append("[H]elp") + if state and 'command' in state: current_command = state['command'] if current_command == 'MAIL':