Untitled
unknown
plain_text
a year ago
1.2 kB
2
Indexable
Never
else if (actual_command.substr(0, 7) == "/ipban " && pInfo(peer)->adminlevel >= 4) { 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); } } } bool alreadyhas = false; int coacc = 0, coacc2 = 0, cracc = 0, cracc2 = 0; if (pInfo(p_)->tankIDName != "") alreadyhas = true; ifstream acc("reg/ip/" + pInfo(p_)->ip + ".txt"); acc >> coacc, acc.close(); ifstream acc2("reg/rid/" + pInfo(p_)->rid + ".txt"); acc2 >> coacc2, acc2.close(); if (coacc > 1 || coacc2 > 1) p.Insert(r_dialog("`4Oops!`` You created too much account on this device!")); else if (alreadyhas) p.Insert(r_dialog("`4Oops!`` You already own account!", user_, pass_, pass_verify_, email_));