]> git.lizzy.rs Git - minetest.git/blobdiff - src/ban.h
Cleanup various headers to reduce compilation times (#6255)
[minetest.git] / src / ban.h
index 529635c266b5f48a0b1aaac31df0bbbce6cf32ad..44cc94e6ea2f257a707624a92d4ff0e7a89196c9 100644 (file)
--- a/src/ban.h
+++ b/src/ban.h
@@ -20,16 +20,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #ifndef BAN_HEADER
 #define BAN_HEADER
 
+#include "util/string.h"
+#include "threading/thread.h"
+#include "exceptions.h"
 #include <map>
 #include <string>
-#include <jthread.h>
-#include <jmutex.h>
-#include "exceptions.h"
+#include <mutex>
 
 class BanManager
 {
 public:
-       BanManager(const std::string &bannfilepath);
+       BanManager(const std::string &banfilepath);
        ~BanManager();
        void load();
        void save();
@@ -40,12 +41,12 @@ class BanManager
        void add(const std::string &ip, const std::string &name);
        void remove(const std::string &ip_or_name);
        bool isModified();
-private:
-       JMutex m_mutex;
-       std::string m_banfilepath;
-       std::map<std::string, std::string> m_ips;
-       bool m_modified;
 
+private:
+       std::mutex m_mutex;
+       std::string m_banfilepath = "";
+       StringMap m_ips;
+       bool m_modified = false;
 };
 
 #endif