Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
709 B
1
Indexable
Never
bool check_perma(ENetPeer* peer) {

	string line;
	ifstream device("db/device.txt");
	if (device.fail()) return 0;
	while (getline(device, line)) {
		if (line.find(pInfo(peer)->ip) != string::npos && !pInfo(peer)->ip.empty() || line.find(pInfo(peer)->vid) != string::npos && !pInfo(peer)->vid.empty() || line.find(pInfo(peer)->aid) != string::npos && !pInfo(peer)->aid.empty() || line.find(pInfo(peer)->wk) != string::npos && !pInfo(peer)->wk.empty() || line.find(pInfo(peer)->mac) != string::npos && !pInfo(peer)->mac.empty() || line.find(pInfo(peer)->rid) != string::npos && !pInfo(peer)->rid.empty() || line.find(pInfo(peer)->gid) != string::npos && !pInfo(peer)->gid.empty()) return true;
	}

}