summaryrefslogtreecommitdiffstats
path: root/src/Core
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-10-20 22:47:07 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-10-20 22:47:07 +0200
commite3d0c98e5a867518800bc79c18f7b13755c056e0 (patch)
tree874fff633e497040a28b72ffc7cbec208b2ac3ee /src/Core
parent3944988f51769b0ffd8e58c05566c82416bf983d (diff)
downloadmad-e3d0c98e5a867518800bc79c18f7b13755c056e0.tar
mad-e3d0c98e5a867518800bc79c18f7b13755c056e0.zip
Einige Verbesserungen am ConfigManager
Diffstat (limited to 'src/Core')
-rw-r--r--src/Core/ConnectionManager.cpp9
-rw-r--r--src/Core/ConnectionManager.h2
2 files changed, 5 insertions, 6 deletions
diff --git a/src/Core/ConnectionManager.cpp b/src/Core/ConnectionManager.cpp
index c135d06..b99296e 100644
--- a/src/Core/ConnectionManager.cpp
+++ b/src/Core/ConnectionManager.cpp
@@ -55,7 +55,10 @@ void ConnectionManager::updateState(const std::string &name, Common::HostInfo::S
}
}
-bool ConnectionManager::handleConfigEntry(const std::vector<std::vector<std::string> > &entry) {
+bool ConnectionManager::handleConfigEntry(const std::vector<std::vector<std::string> > &entry, bool handled) {
+ if(handled)
+ return false;
+
if(Common::Util::tolower(entry.front().front()) == "listen" && entry.size() == 1) {
if(entry.front().size() == 2) {
try {
@@ -154,14 +157,10 @@ ConnectionManager::ConnectionManager() {
Common::RequestManager::getRequestManager()->registerPacketType<RequestHandlers::IdentifyRequestHandler>(Net::Packet::IDENTIFY);
Common::RequestManager::getRequestManager()->registerPacketType<RequestHandlers::LogRequestHandler>(Net::Packet::LOG);
- Common::ConfigManager::getConfigManager()->registerConfigurable(this);
-
Net::Connection::init();
}
ConnectionManager::~ConnectionManager() {
- Common::ConfigManager::getConfigManager()->unregisterConfigurable(this);
-
for(std::list<Net::ServerConnection*>::iterator con = daemonConnections.begin(); con != daemonConnections.end(); ++con)
delete *con;
diff --git a/src/Core/ConnectionManager.h b/src/Core/ConnectionManager.h
index a069478..d5bb718 100644
--- a/src/Core/ConnectionManager.h
+++ b/src/Core/ConnectionManager.h
@@ -67,7 +67,7 @@ class ConnectionManager : private Common::Configurable {
void updateState(const std::string &name, Common::HostInfo::State state);
protected:
- virtual bool handleConfigEntry(const std::vector<std::vector<std::string> > &entry);
+ virtual bool handleConfigEntry(const std::vector<std::vector<std::string> > &entry, bool handled);
virtual void configFinished();
public: