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

Function getbantype

source/src/server.cpp:2521–2536  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2519}
2520
2521int getbantype(int cn)
2522{
2523 if(!valid_client(cn)) return BAN_NONE;
2524 client &c = *clients[cn];
2525 if(c.type==ST_LOCAL) return BAN_NONE;
2526 if(c.checkvitadate(VS_BAN)) return BAN_VITA;
2527 if(checkgban(c.peer->address.host)) return BAN_MASTER;
2528 if(ipblacklist.check(c.peer->address.host)) return BAN_BLACKLIST;
2529 loopv(bans)
2530 {
2531 ban &b = bans[i];
2532 if(b.millis < servmillis) { bans.remove(i--); }
2533 if(b.address.host == c.peer->address.host) return b.type;
2534 }
2535 return BAN_NONE;
2536}
2537
2538int serveroperator()
2539{

Callers 1

processFunction · 0.85

Calls 4

valid_clientFunction · 0.85
checkgbanFunction · 0.85
checkvitadateMethod · 0.80
checkMethod · 0.45

Tested by

no test coverage detected