diff options
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r-- | src/configreader.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index 83b7e14d9..cba015ec9 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -63,32 +63,12 @@ void ServerConfig::ClearStack() include_stack.clear(); } -Module* ServerConfig::GetIOHook(int port) -{ - std::map<int,Module*>::iterator x = IOHookModule.find(port); - return (x != IOHookModule.end() ? x->second : NULL); -} - Module* ServerConfig::GetIOHook(BufferedSocket* is) { std::map<BufferedSocket*,Module*>::iterator x = SocketIOHookModule.find(is); return (x != SocketIOHookModule.end() ? x->second : NULL); } -bool ServerConfig::AddIOHook(int port, Module* iomod) -{ - if (!GetIOHook(port)) - { - IOHookModule[port] = iomod; - return true; - } - else - { - throw ModuleException("Port already hooked by another module"); - return false; - } -} - bool ServerConfig::AddIOHook(Module* iomod, BufferedSocket* is) { if (!GetIOHook(is)) @@ -104,17 +84,6 @@ bool ServerConfig::AddIOHook(Module* iomod, BufferedSocket* is) } } -bool ServerConfig::DelIOHook(int port) -{ - std::map<int,Module*>::iterator x = IOHookModule.find(port); - if (x != IOHookModule.end()) - { - IOHookModule.erase(x); - return true; - } - return false; -} - bool ServerConfig::DelIOHook(BufferedSocket* is) { std::map<BufferedSocket*,Module*>::iterator x = SocketIOHookModule.find(is); |