X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fban.cpp;h=57b9f49a57aba6f02e33a940cd384d2bbe72fa98;hb=65c09a96f41705bb8e75fc5ff4276342be91ed11;hp=7c1a68d458af2d330150198c8d812dc1d79df0c9;hpb=da34a2b33e1f600ec11172f599384b9a92835403;p=minetest.git diff --git a/src/ban.cpp b/src/ban.cpp index 7c1a68d45..57b9f49a5 100644 --- a/src/ban.cpp +++ b/src/ban.cpp @@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "ban.h" #include -#include "jthread/jmutexautolock.h" +#include "threading/mutex_auto_lock.h" #include #include #include "strfnd.h" @@ -36,7 +36,7 @@ BanManager::BanManager(const std::string &banfilepath): } catch(SerializationError &e) { - infostream<<"WARNING: BanManager: creating " + warningstream<<"BanManager: creating " <first == ip_or_name || it->second == ip_or_name @@ -110,7 +110,7 @@ std::string BanManager::getBanDescription(const std::string &ip_or_name) std::string BanManager::getBanName(const std::string &ip) { - JMutexAutoLock lock(m_mutex); + MutexAutoLock lock(m_mutex); StringMap::iterator it = m_ips.find(ip); if (it == m_ips.end()) return ""; @@ -119,14 +119,14 @@ std::string BanManager::getBanName(const std::string &ip) void BanManager::add(const std::string &ip, const std::string &name) { - JMutexAutoLock lock(m_mutex); + MutexAutoLock lock(m_mutex); m_ips[ip] = name; m_modified = true; } void BanManager::remove(const std::string &ip_or_name) { - JMutexAutoLock lock(m_mutex); + MutexAutoLock lock(m_mutex); for (StringMap::iterator it = m_ips.begin(); it != m_ips.end();) { if ((it->first == ip_or_name) || (it->second == ip_or_name)) { m_ips.erase(it++); @@ -140,7 +140,7 @@ void BanManager::remove(const std::string &ip_or_name) bool BanManager::isModified() { - JMutexAutoLock lock(m_mutex); + MutexAutoLock lock(m_mutex); return m_modified; }