url_t downloader::get_full_url(string_t const& url) const { if (url.find("http://") == std::string::npos) { return url_t(config_.host + url); } else { return url; } }
int urlsniffer_type::load_urls_from_file() { ifstream f; f.open(URL_FILE); string timestamp, nick, channel, url; int i = 0; if (f.is_open()) { this->urls_seen.clear(); while (!f.eof()) { f >> timestamp; f >> nick; f >> channel; f >> url; if (!f.eof()) { url_type url_t(url, channel, nick, timestamp); this->urls_seen.push_back(url_t); i++; } } }