Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
710 B
2
Indexable
Never
else if (actual_command.substr(0, 7) == "/ipban " && pInfo(peer)->adminlevel >= 6) {
            pInfo(peer)->last_wrenched = cmd.substr(7, cmd.length() - 7).c_str();
            for (ENetPeer* currentPeer = server->peers; currentPeer < &server->peers[server->peerCount]; ++currentPeer) {
                if (currentPeer->state != ENET_PEER_STATE_CONNECTED or currentPeer->data == NULL) continue;
                if (to_lower(pInfo(currentPeer)->tankIDName) == to_lower(pInfo(peer)->last_wrenched)) {
                    add_ban(currentPeer, 6.307e+7, "No reason", pInfo(peer)->name_color + pInfo(peer)->tankIDName + "``");
                    add_ipban(currentPeer);

                }
            }
        }