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

Function purgeauths

source/src/master.cpp:455–469  ·  view source on GitHub ↗

for AUTH:

Source from the content-addressed store, hash-verified

453
454// for AUTH:
455void purgeauths(mclient &c)
456{
457 int expired = 0;
458 loopv(c.authreqs)
459 {
460 if(ENET_TIME_DIFFERENCE(servtime, c.authreqs[i].reqtime) >= AUTH_TIME)
461 {
462 outputf(c, "failauth %u\n", c.authreqs[i].id);
463// freechallenge(c.authreqs[i].answer);
464 expired = i + 1;
465 }
466 else break;
467 }
468 if(expired > 0) c.authreqs.remove(0, expired);
469}
470
471void reqauth(mclient &c, uint id, char *name)
472{

Callers 2

reqauthFunction · 0.85
confauthFunction · 0.85

Calls 3

outputfFunction · 0.85
loopvFunction · 0.70
removeMethod · 0.45

Tested by

no test coverage detected