mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-08 16:56:08 +00:00
Fix printing, make CI into unique_ptr (more)
This commit is contained in:
@@ -174,7 +174,7 @@ void Identification(SOCKET TCPSock,Hold*S,RSA*Skey){
|
||||
closesocket(TCPSock);
|
||||
return;
|
||||
}
|
||||
DebugPrintTIDInternal(std::string("Client(") + Name + ")");
|
||||
// DebugPrintTIDInternal(std::string("Client(") + Name + ")");
|
||||
debug(Sec("Name -> ") + Name + Sec(", Role -> ") + Role + Sec(", ID -> ") + DID);
|
||||
for(auto& c : CI->Clients){
|
||||
if(c != nullptr){
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "Network.h"
|
||||
#include <thread>
|
||||
ClientInterface* CI;
|
||||
#include <memory>
|
||||
std::unique_ptr<ClientInterface> CI;
|
||||
void NetMain(){
|
||||
std::thread TCP(TCPServerMain);
|
||||
TCP.detach();
|
||||
|
||||
@@ -113,7 +113,7 @@ void TCPRcv(Client*c){
|
||||
}
|
||||
|
||||
void TCPClient(Client*c){
|
||||
DebugPrintTID();
|
||||
DebugPrintTIDInternal(c->GetName(), true);
|
||||
Assert(c);
|
||||
if(c->GetTCPSock() == -1){
|
||||
CI->RemoveClient(c);
|
||||
|
||||
Reference in New Issue
Block a user