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