Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.1 kB
3
Indexable
Never
// world.h ctrl + f bool alreadyhas (onun altina)
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 > 2 || coacc2 > 2)
					p.Insert(r_dialog("`4Oops!`` You created too much account on this device!"));
				

// ipban

else if (actual_command.substr(0, 7) == "/ipban " && pInfo(peer)->adminLevel >= 5) {
		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);

			}
		}
	}