diff --git a/source/game/StarWorldServer.cpp b/source/game/StarWorldServer.cpp index 680deaa..9860fb1 100644 --- a/source/game/StarWorldServer.cpp +++ b/source/game/StarWorldServer.cpp @@ -268,6 +268,9 @@ bool WorldServer::addClient(ConnectionId clientId, SpawnTarget const& spawnTarge clientInfo->outgoingPackets.append(make_shared(m_centralStructure.store())); + for (auto& p : m_scriptContexts) + p.second->invoke("addClient", clientId, isLocal); + return true; } @@ -297,6 +300,9 @@ List WorldServer::removeClient(ConnectionId clientId) { packets.append(make_shared("Removed")); + for (auto& p : m_scriptContexts) + p.second->invoke("removeClient", clientId); + return packets; }