mirror of
https://github.com/onyx-and-iris/q3rcon-cli.git
synced 2026-04-18 06:53:40 +00:00
Compare commits
2 Commits
v0.2.5
...
60afda97dc
| Author | SHA1 | Date | |
|---|---|---|---|
| 60afda97dc | |||
| 968cd2dc8a |
@@ -78,14 +78,14 @@ class Q3rconCli(Command):
|
|||||||
if command.lower() == 'q':
|
if command.lower() == 'q':
|
||||||
break
|
break
|
||||||
|
|
||||||
TIMEOUTS = {
|
CMD_CONFIG = {
|
||||||
'status': (2, 1, False),
|
'status': (2, 1, False),
|
||||||
'fast_restart': (3, 1, True),
|
'fast_restart': (3, 1, True),
|
||||||
'map_restart': (3, 1, True),
|
'map_restart': (3, 1, True),
|
||||||
'map': (3, 1, True),
|
'map': (3, 1, True),
|
||||||
'map_rotate': (3, 1, True),
|
'map_rotate': (3, 1, True),
|
||||||
}
|
}
|
||||||
timeout, fragment_read_timeout, interpret = TIMEOUTS.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),
|
||||||
)
|
)
|
||||||
@@ -95,9 +95,8 @@ class Q3rconCli(Command):
|
|||||||
self.host,
|
self.host,
|
||||||
self.port,
|
self.port,
|
||||||
self.password,
|
self.password,
|
||||||
timeout=timeout or DEFAULT_TIMEOUT,
|
timeout=timeout,
|
||||||
fragment_read_timeout=fragment_read_timeout
|
fragment_read_timeout=fragment_read_timeout,
|
||||||
or DEFAULT_FRAGMENT_READ_TIMEOUT,
|
|
||||||
) as client:
|
) as client:
|
||||||
try:
|
try:
|
||||||
if response := await client.send_command(
|
if response := await client.send_command(
|
||||||
|
|||||||
Reference in New Issue
Block a user