#include "stdafx.h" #include "BannedClints.h" #include BannedClients::BannedClients(Cserver& server): m_server(server) ; std::istream& BannedClients::load(std::istream& is, std::vector& storage) { std:vector::iterator it = *storage.begin(); for (std::string s; getline(is, s); ) { *storage.insert(it++,s); } return is; } int BannedClients::load(const std::string& file std::vector& storage) { std::ifstream is(file.c_str()); if (!is) return 1; load(is,storage); return !is.eof(); } bool BannedClients::LoadData() { if(!load(b_peerid_file,b_peerid)&& !load(b_agent_file,b_agent)) { std::err << "Unable to load banned client data files!"; return true; } return false; } bool BannedClients::CheckPeer(std::string& peer) { std::vectoriterator it; for (it=b_peer.begin(); ititerator it; for (it=b_agent.begin(); it