MCPcopy Create free account
hub / github.com/assaultcube/AC / addserver

Function addserver

source/src/serverbrowser.cpp:319–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317}
318
319void addserver(const char *servername, int serverport, int weight)
320{
321 if(serverport <= 0) serverport = CUBE_DEFAULT_SERVER_PORT;
322
323 loopv(servers) if(strcmp(servers[i]->name, servername)==0 && servers[i]->port == serverport) return;
324
325 newserver(servername, ENET_HOST_ANY, serverport, weight);
326}
327
328VARP(servpingrate, 1000, 5000, 60000);
329VARP(maxservpings, 0, 10, 1000);

Callers 3

connectserv_Function · 0.85
updatefrommasterFunction · 0.85
serverbrowser.cppFile · 0.85

Calls 2

newserverFunction · 0.85
loopvFunction · 0.70

Tested by

no test coverage detected