Update command_handlers.py

disable features from config.ini
This commit is contained in:
Blergo 2024-07-03 14:18:35 +01:00 committed by GitHub
parent a1d922d29c
commit dcec7d94b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -37,16 +37,21 @@ def handle_exit_command(sender_id, interface):
def handle_help_command(sender_id, interface, state=None): def handle_help_command(sender_id, interface, state=None):
title = "█▓▒░ Yorkshire BBS ░▒▓█\n\n" title = "█▓▒░ Yorkshire BBS ░▒▓█\n\n"
commands = [ commands = []
"[M]ail", if mail in interface.disabled == False:
"[B]ulletin", commands.append("[M]ail")
"[S]tats", if bulletin in interface.disabled == False:
#"[F]ortune", commands.append("[B]ulletin")
#"[W]all of Shame", if stats in interface.disabled == False:
#"[C]hannel Directory", commands.append("[S]tats")
#"EXIT: Exit current menu", if fortune in interface.disabled == False:
"[H]elp" 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: if state and 'command' in state:
current_command = state['command'] current_command = state['command']
if current_command == 'MAIL': if current_command == 'MAIL':