Players list in wss example
This commit is contained in:
parent
c2610c04e5
commit
cf73845b2b
1 changed files with 11 additions and 0 deletions
|
@ -28,9 +28,13 @@ async def state(
|
||||||
msg: Dict[Any, Any],
|
msg: Dict[Any, Any],
|
||||||
args: Tuple[str]) -> None:
|
args: Tuple[str]) -> None:
|
||||||
|
|
||||||
|
# For debugging
|
||||||
print(args[0], 'received', len(msg), 'symbols')
|
print(args[0], 'received', len(msg), 'symbols')
|
||||||
|
|
||||||
|
# Write new info dictionary
|
||||||
server._info = msg
|
server._info = msg
|
||||||
|
|
||||||
|
# Server 1 test is online
|
||||||
print(
|
print(
|
||||||
args[0],
|
args[0],
|
||||||
server.subdomain,
|
server.subdomain,
|
||||||
|
@ -38,6 +42,13 @@ async def state(
|
||||||
server.status
|
server.status
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Server 1 players: ['DarkCat09', 'someone']
|
||||||
|
print(
|
||||||
|
args[0],
|
||||||
|
'players:',
|
||||||
|
server.players_list
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# Main function
|
# Main function
|
||||||
async def main() -> None:
|
async def main() -> None:
|
||||||
|
|
Reference in a new issue