aboutsummaryrefslogtreecommitdiff
path: root/po/de
Commit message (Expand)AuthorAge
* Translated using Weblate (German)Pilz Adam2013-06-01
* Translated using Weblate (German)sfan52013-05-13
* Update po filesPilzAdam2013-05-13
* Translated using Weblate (German)Pilz Adam2013-05-01
* Translated using Weblate (German)Pilz Adam2013-04-18
* Translated using Weblate (German)Sfan52013-04-03
* Translated using Weblate (German)Markus Lehmann2013-04-01
* Translated using Weblate (German)Pilz Adam2013-03-31
* Translated using Weblate (German)Pilz Adam2013-03-30
* Update po filesPilzAdam2013-03-30
* Translated using Weblate (German)Sfan52013-02-28
* Translated using Weblate (German)Pilz Adam2013-02-21
* Translated using Weblate (German)Pilz Adam2013-02-05
* Translated using Weblate (German)Pilz Adam2013-02-02
* Merge remote branch 'origin/master'Weblate2013-02-02
|\
| * Translate key functions in key change menuPilzAdam2013-01-30
* | Translated using Weblate (German)Pilz Adam2013-02-02
|/
* Translated using Weblate (German)Pilz Adam2013-01-24
* Update translation filesPerttu Ahola2013-01-23
* changed on string in german translation to fit to guiConstantin Wenger2011-08-05
* update op PO filesConstantin Wenger2011-08-05
* update to german translationConstantin Wenger2011-08-05
* german translation update, translated some of the new stringsConstantin Wenger2011-07-30
* set some more text to gettext and updated po filesConstantin Wenger2011-07-30
* changed some strings of the german translation to fit in the areasConstantin Wenger2011-07-30
* updatepo cmake ruleGiuseppe Bilotta2011-07-22
* Static naming of po fileGiuseppe Bilotta2011-07-22
* updated german po file for minetest-delta (prior it was for minetest)Constantin Wenger2011-07-20
* added gettext supportConstantin Wenger2011-07-20
class="hl opt">} } BanManager::~BanManager() { save(); } void BanManager::load() { JMutexAutoLock lock(m_mutex); dstream<<"BanManager: loading from "<<m_banfilepath<<std::endl; std::ifstream is(m_banfilepath.c_str(), std::ios::binary); if(is.good() == false) { dstream<<"BanManager: failed loading from "<<m_banfilepath<<std::endl; throw SerializationError("BanManager::load(): Couldn't open file"); } for(;;) { if(is.eof() || is.good() == false) break; std::string line; std::getline(is, line, '\n'); Strfnd f(line); std::string ip = trim(f.next("|")); std::string name = trim(f.next("|")); if(ip.empty()) continue; m_ips[ip] = name; } m_modified = false; } void BanManager::save() { JMutexAutoLock lock(m_mutex); dstream<<"BanManager: saving to "<<m_banfilepath<<std::endl; std::ofstream os(m_banfilepath.c_str(), std::ios::binary); if(os.good() == false) { dstream<<"BanManager: failed loading from "<<m_banfilepath<<std::endl; throw SerializationError("BanManager::load(): Couldn't open file"); } for(std::map<std::string, std::string>::iterator i = m_ips.begin(); i != m_ips.end(); i++) { os<<i->first<<"|"<<i->second<<"\n"; } m_modified = false; } bool BanManager::isIpBanned(const std::string &ip) { JMutexAutoLock lock(m_mutex); return m_ips.find(ip) != m_ips.end(); } std::string BanManager::getBanDescription(const std::string &ip_or_name) { JMutexAutoLock lock(m_mutex); std::string s = ""; for(std::map<std::string, std::string>::iterator i = m_ips.begin(); i != m_ips.end(); i++) { if(i->first == ip_or_name || i->second == ip_or_name || ip_or_name == "") s += i->first + "|" + i->second + ", "; } s = s.substr(0, s.size()-2); return s; } std::string BanManager::getBanName(const std::string &ip) { JMutexAutoLock lock(m_mutex); std::map<std::string, std::string>::iterator i = m_ips.find(ip); if(i == m_ips.end()) return ""; return i->second; } void BanManager::add(const std::string &ip, const std::string &name) { JMutexAutoLock lock(m_mutex); m_ips[ip] = name; m_modified = true; } void BanManager::remove(const std::string &ip_or_name) { JMutexAutoLock lock(m_mutex); //m_ips.erase(m_ips.find(ip)); // Find out all ip-name pairs that match the ip or name std::set<std::string> ips_to_delete; for(std::map<std::string, std::string>::iterator i = m_ips.begin(); i != m_ips.end(); i++) { if(i->first == ip_or_name || i->second == ip_or_name) ips_to_delete.insert(i->first); } // Erase them for(std::set<std::string>::iterator i = ips_to_delete.begin(); i != ips_to_delete.end(); i++) { m_ips.erase(*i); } m_modified = true; } bool BanManager::isModified() { JMutexAutoLock lock(m_mutex); return m_modified; }