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

Function sendiplist

source/src/server.cpp:2833–2846  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2831}
2832
2833void sendiplist(int receiver, int cn)
2834{
2835 if(!valid_client(receiver)) return;
2836 packetbuf p(MAXTRANS, ENET_PACKET_FLAG_RELIABLE);
2837 putint(p, SV_IPLIST);
2838 loopv(clients) if(valid_client(i) && clients[i]->type == ST_TCPIP && i != receiver
2839 && (clients[i]->clientnum == cn || cn == -1))
2840 {
2841 putint(p, i);
2842 putint(p, clients[i]->ip);
2843 }
2844 putint(p, -1);
2845 sendpacket(receiver, 1, p.finalize());
2846}
2847
2848void sendresume(client &c, bool broadcast)
2849{

Callers 2

changeclientroleFunction · 0.85
loopvFunction · 0.85

Calls 5

valid_clientFunction · 0.85
putintFunction · 0.85
sendpacketFunction · 0.85
finalizeMethod · 0.80
loopvFunction · 0.70

Tested by

no test coverage detected