From 1b3a914d5fdf5a578e24754845c6350c59c0b523 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 29 Sep 2009 18:12:59 +0200 Subject: Fixed some UserListManager-related bugs --- src/Server/UserListManager.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/Server/UserListManager.cpp') diff --git a/src/Server/UserListManager.cpp b/src/Server/UserListManager.cpp index 04ba7d2..8e524a0 100644 --- a/src/Server/UserListManager.cpp +++ b/src/Server/UserListManager.cpp @@ -34,24 +34,20 @@ namespace Mad { namespace Server { UserListManager::UserListManager(Application *application0) : application(application0), requestHandlerGroup(new RequestHandlers::UserListRequestHandlerGroup(application)) { - application->getConfigManager()->registerConfigurable(this); + application->getRequestManager()->registerRequestHandlerGroup(requestHandlerGroup); + application->getRequestManager()->registerPacketType("UploadUserList"); + application->getRequestManager()->registerPacketType("UploadUserListDiff"); } UserListManager::~UserListManager() { application->getRequestManager()->unregisterPacketType("UploadUserList"); application->getRequestManager()->unregisterPacketType("UploadUserListDiff"); application->getRequestManager()->unregisterRequestHandlerGroup(requestHandlerGroup); - application->getConfigManager()->unregisterConfigurable(this); } -void UserListManager::configure() { - userLists = application->getStorageManager()->list("UserList"); - userListDiffs = application->getStorageManager()->list("UserListDiff"); - - application->getRequestManager()->registerRequestHandlerGroup(requestHandlerGroup); - application->getRequestManager()->registerPacketType("UploadUserList"); - application->getRequestManager()->registerPacketType("UploadUserListDiff"); +std::set UserListManager::getUserLists() { + return application->getStorageManager()->list("UserList"); } bool UserListManager::existsUserList(const Core::String &name) { @@ -87,6 +83,10 @@ void UserListManager::removeUserList(const Core::String &name) { } +std::set UserListManager::getUserListDiffs() { + return application->getStorageManager()->list("UserListDiff"); +} + bool UserListManager::existsUserListDiff(const Core::String &name) { return application->getStorageManager()->exists("UserListDiff", name); } -- cgit v1.2.3