use same version format on client and server

This commit is contained in:
Fabian Dill 2020-02-16 16:20:00 +01:00
parent d3519dbaa1
commit 18911a1490
2 changed files with 5 additions and 2 deletions

View File

@ -610,7 +610,10 @@ async def process_server_cmd(ctx : Context, cmd, args):
logging.info('--------------------------------') logging.info('--------------------------------')
logging.info('Room Information:') logging.info('Room Information:')
logging.info('--------------------------------') logging.info('--------------------------------')
logging.info(f'Server protocol version: {args.get("version", "unknown Bonta Protocol")}') version = args.get("version", "unknown Bonta Protocol")
if not type(version) == 'str':
version = ".".join(str(item) for item in version)
logging.info(f'Server protocol version: {version}')
if "tags" in args: if "tags" in args:
logging.info("Server protocol tags: " + ", ".join(args["tags"])) logging.info("Server protocol tags: " + ", ".join(args["tags"]))
if args['password']: if args['password']:

View File

@ -157,7 +157,7 @@ async def on_client_connected(ctx : Context, client : Client):
# tags are for additional features in the communication. # tags are for additional features in the communication.
# Name them by feature or fork, as you feel is appropriate. # Name them by feature or fork, as you feel is appropriate.
'tags': ['Berserker'], 'tags': ['Berserker'],
'version': "1.0.0" 'version': [1, 0, 0]
}]]) }]])
async def on_client_disconnected(ctx : Context, client : Client): async def on_client_disconnected(ctx : Context, client : Client):