commander update
This commit is contained in:
parent
72b08b631d
commit
6064bd3f70
@ -153,6 +153,10 @@
|
||||
|
||||
function addBoats(boats)
|
||||
{
|
||||
if (boats == "")
|
||||
{
|
||||
return;
|
||||
}
|
||||
boats = boats.split(':');
|
||||
for (let boat in boats)
|
||||
{
|
||||
|
||||
@ -148,7 +148,10 @@ async def on_message(message, client):
|
||||
async def new_client(clientId, ws):
|
||||
"""handler for every new client connection"""
|
||||
client = { "id": clientId, "boat": None, "ws": ws, "state": "active" }
|
||||
print("new client connected: " + client['id'])
|
||||
if client['id'] == ADMIN_ID:
|
||||
print("new client connected: admin")
|
||||
else:
|
||||
print("new client connected: " + client['id'])
|
||||
for clie in Clients:
|
||||
if clie['id'] == client['id']:
|
||||
clie['state'] = 'terminated'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user