diff options
Diffstat (limited to 'client/Config.cpp')
-rw-r--r-- | client/Config.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/client/Config.cpp b/client/Config.cpp index 614d95f..7fef568 100644 --- a/client/Config.cpp +++ b/client/Config.cpp @@ -114,6 +114,28 @@ vector<string> Config::GetProxies(string &country, string &state, string &city) return proxies; } +vector<ProxyEntryStatic> Config::GetStaticProxyGuiLine(int line) +{ + vector<ProxyEntryStatic> staticProxyLine; + for (unsigned i = 0; i < staticProxy.size(); i++) + { + if (staticProxy[i].position == line) + staticProxyLine.push_back(staticProxy[i]); + } + return staticProxyLine; +} + +unsigned Config::GetStaticProxyGuiLines() +{ + int maxLine = 0; + for (unsigned i = 0; i < staticProxy.size(); i++) + { + if (staticProxy[i].position > maxLine) + maxLine = staticProxy[i].position; + } + return maxLine; +} + int Config::ReadGenericProxy() { Logger::Info("Parsing generic proxy list\n"); @@ -130,6 +152,7 @@ int Config::ReadGenericProxy() while (!proxyFile.eof()) { proxyFile.getline(str, str_size, ';'); + proxyFile.ignore(2, '\n'); if (proxyFile.eof()) break; string entry = str; @@ -157,6 +180,7 @@ int Config::ReadStaticProxy() while (!proxyFile.eof()) { proxyFile.getline(str, str_size, ';'); + proxyFile.ignore(2, '\n'); if (proxyFile.eof()) break; string entry = str; |