MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / OnConnect

Method OnConnect

src/network/network.cpp:758–767  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

756 }
757
758 void OnConnect(SOCKET s) override
759 {
760 Debug(net, 9, "Client::OnConnect(): connection_string={}", this->connection_string);
761
762 _networking = true;
763 _network_own_client_id = ClientID{};
764 new ClientNetworkGameSocketHandler(s, this->connection_string);
765 IConsoleCmdExec("exec scripts/on_client.scr 0");
766 NetworkClient_Connected();
767 }
768};
769
770/**

Callers

nothing calls this directly

Calls 2

IConsoleCmdExecFunction · 0.85
NetworkClient_ConnectedFunction · 0.85

Tested by

no test coverage detected