From b1965ac20922e3722392114bd63a22b403dcbe98 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Wed, 25 Jun 2014 20:28:41 -0400 Subject: Clean up rollback --- src/server.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/server.cpp') diff --git a/src/server.cpp b/src/server.cpp index d1f3997e9..857114d0f 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -181,7 +181,6 @@ Server::Server( this), m_banmanager(NULL), m_rollback(NULL), - m_rollback_sink_enabled(true), m_enable_rollback_recording(false), m_emerge(NULL), m_script(NULL), @@ -241,12 +240,11 @@ Server::Server( throw ServerError("Failed to initialize world"); // Create ban manager - std::string ban_path = m_path_world+DIR_DELIM+"ipban.txt"; + std::string ban_path = m_path_world + DIR_DELIM "ipban.txt"; m_banmanager = new BanManager(ban_path); // Create rollback manager - std::string rollback_path = m_path_world+DIR_DELIM+"rollback.txt"; - m_rollback = createRollbackManager(rollback_path, this); + m_rollback = new RollbackManager(m_path_world, this); ModConfiguration modconf(m_path_world); m_mods = modconf.getMods(); @@ -4834,8 +4832,6 @@ bool Server::rollbackRevertActions(const std::list &actions, { infostream<<"Server::rollbackRevertActions(len="<getMap()); - // Disable rollback report sink while reverting - BoolScopeSet rollback_scope_disable(&m_rollback_sink_enabled, false); // Fail if no actions to handle if(actions.empty()){ @@ -4915,14 +4911,6 @@ MtEventManager* Server::getEventManager() { return m_event; } -IRollbackReportSink* Server::getRollbackReportSink() -{ - if(!m_enable_rollback_recording) - return NULL; - if(!m_rollback_sink_enabled) - return NULL; - return m_rollback; -} IWritableItemDefManager* Server::getWritableItemDefManager() { -- cgit v1.2.3