diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-03-10 15:49:38 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-03-10 15:49:38 +0200 |
commit | 9c5e422d3a5fc3784d261a1effdb94a44b84a41c (patch) | |
tree | f6e2fe229a98d168fa76a4126df2879f7c840fa4 /src | |
parent | 5e001410059d3768be496bb7e67181d224db657e (diff) | |
download | minetest-9c5e422d3a5fc3784d261a1effdb94a44b84a41c.tar.gz minetest-9c5e422d3a5fc3784d261a1effdb94a44b84a41c.tar.bz2 minetest-9c5e422d3a5fc3784d261a1effdb94a44b84a41c.zip |
Ban and Auth managers use infostream rather than dstream
Diffstat (limited to 'src')
-rw-r--r-- | src/auth.cpp | 12 | ||||
-rw-r--r-- | src/ban.cpp | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/auth.cpp b/src/auth.cpp index 7326a6042..fce521e13 100644 --- a/src/auth.cpp +++ b/src/auth.cpp @@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., //#include "main.h" // for g_settings #include <sstream> #include "strfnd.h" -#include "debug.h" +#include "log.h" std::set<std::string> privsToSet(u64 privs) { @@ -123,7 +123,7 @@ AuthManager::AuthManager(const std::string &authfilepath): } catch(SerializationError &e) { - dstream<<"WARNING: AuthManager: creating " + infostream<<"WARNING: AuthManager: creating " <<m_authfilepath<<std::endl; } } @@ -137,11 +137,11 @@ void AuthManager::load() { JMutexAutoLock lock(m_mutex); - dstream<<"AuthManager: loading from "<<m_authfilepath<<std::endl; + infostream<<"AuthManager: loading from "<<m_authfilepath<<std::endl; std::ifstream is(m_authfilepath.c_str(), std::ios::binary); if(is.good() == false) { - dstream<<"AuthManager: failed loading from "<<m_authfilepath<<std::endl; + infostream<<"AuthManager: failed loading from "<<m_authfilepath<<std::endl; throw SerializationError("AuthManager::load(): Couldn't open file"); } @@ -183,11 +183,11 @@ void AuthManager::save() { JMutexAutoLock lock(m_mutex); - dstream<<"AuthManager: saving to "<<m_authfilepath<<std::endl; + infostream<<"AuthManager: saving to "<<m_authfilepath<<std::endl; std::ofstream os(m_authfilepath.c_str(), std::ios::binary); if(os.good() == false) { - dstream<<"AuthManager: failed saving to "<<m_authfilepath<<std::endl; + infostream<<"AuthManager: failed saving to "<<m_authfilepath<<std::endl; throw SerializationError("AuthManager::save(): Couldn't open file"); } diff --git a/src/ban.cpp b/src/ban.cpp index 398976260..7fa8eb058 100644 --- a/src/ban.cpp +++ b/src/ban.cpp @@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include <sstream> #include <set> #include "strfnd.h" -#include "debug.h" +#include "log.h" BanManager::BanManager(const std::string &banfilepath): m_banfilepath(banfilepath), @@ -35,7 +35,7 @@ BanManager::BanManager(const std::string &banfilepath): } catch(SerializationError &e) { - dstream<<"WARNING: BanManager: creating " + infostream<<"WARNING: BanManager: creating " <<m_banfilepath<<std::endl; } } @@ -48,11 +48,11 @@ BanManager::~BanManager() void BanManager::load() { JMutexAutoLock lock(m_mutex); - dstream<<"BanManager: loading from "<<m_banfilepath<<std::endl; + infostream<<"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; + infostream<<"BanManager: failed loading from "<<m_banfilepath<<std::endl; throw SerializationError("BanManager::load(): Couldn't open file"); } @@ -75,12 +75,12 @@ void BanManager::load() void BanManager::save() { JMutexAutoLock lock(m_mutex); - dstream<<"BanManager: saving to "<<m_banfilepath<<std::endl; + infostream<<"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; + infostream<<"BanManager: failed loading from "<<m_banfilepath<<std::endl; throw SerializationError("BanManager::load(): Couldn't open file"); } |