| 514 | } |
| 515 | |
| 516 | void 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 | |
| 542 | bool checkclientinput(mclient &c) |
no test coverage detected