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

Function confauth

source/src/master.cpp:516–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514}
515
516void confauth(mclient &c, uint id, const char *val)
517{
518 purgeauths(c);
519
520 loopv(c.authreqs) if(c.authreqs[i].id == id)
521 {
522 string ip;
523 if(enet_address_get_host_ip(&c.address, ip, sizeof(ip)) < 0) copystring(ip, "-");
524 if(0)//checkchallenge(val, c.authreqs[i].answer))
525 {
526 outputf(c, "succauth %u\n", id);
527 conoutf("succeeded %u from %s", id, ip);
528 }
529 else
530 {
531 outputf(c, "failauth %u\n", id);
532 conoutf("failed %u from %s", id, ip);
533 }
534// freechallenge(c.authreqs[i].answer);
535 c.authreqs.remove(i--);
536 return;
537 }
538 outputf(c, "failauth %u\n", id);
539}
540// :for AUTH
541
542bool checkclientinput(mclient &c)

Callers 1

checkclientinputFunction · 0.85

Calls 7

purgeauthsFunction · 0.85
copystringFunction · 0.85
outputfFunction · 0.85
loopvFunction · 0.70
conoutfFunction · 0.70
enet_address_get_host_ipFunction · 0.50
removeMethod · 0.45

Tested by

no test coverage detected