mv CMD_CONFIG

This commit is contained in:
2026-03-24 15:56:56 +00:00
parent 305af813b8
commit 89539ae817

View File

@@ -86,19 +86,19 @@ class Q3rconCli(Command):
clypi.style('to quit.', fg='blue'), clypi.style('to quit.', fg='blue'),
) )
CMD_CONFIG = {
'status': (2, 1, False),
'fast_restart': (3, 1, True),
'map_restart': (3, 1, True),
'map': (3, 1, True),
'map_rotate': (3, 1, True),
}
DEFAULT_TIMEOUT = 2 DEFAULT_TIMEOUT = 2
DEFAULT_FRAGMENT_READ_TIMEOUT = 0.25 DEFAULT_FRAGMENT_READ_TIMEOUT = 0.25
while command := input(clypi.style('cmd: ', fg='green')): while command := input(clypi.style('cmd: ', fg='green')):
if command.lower() == 'q': if command.lower() == 'q':
break break
CMD_CONFIG = {
'status': (2, 1, False),
'fast_restart': (3, 1, True),
'map_restart': (3, 1, True),
'map': (3, 1, True),
'map_rotate': (3, 1, True),
}
timeout, fragment_read_timeout, interpret = CMD_CONFIG.get( timeout, fragment_read_timeout, interpret = CMD_CONFIG.get(
command.split()[0].lower(), command.split()[0].lower(),
(DEFAULT_TIMEOUT, DEFAULT_FRAGMENT_READ_TIMEOUT, False), (DEFAULT_TIMEOUT, DEFAULT_FRAGMENT_READ_TIMEOUT, False),