summaryrefslogtreecommitdiff
path: root/src/inspircd_io.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inspircd_io.cpp')
-rw-r--r--src/inspircd_io.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp
index b1e90bfd0..aa6c8e33a 100644
--- a/src/inspircd_io.cpp
+++ b/src/inspircd_io.cpp
@@ -63,6 +63,32 @@ 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);
+}
+
+bool ServerConfig::AddIOHook(int port, Module* iomod)
+{
+ if (!GetIOHook(port))
+ {
+ IOHookModule[port] = iomod;
+ return true;
+ }
+ return false;
+}
+
+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;
+}
void ServerConfig::Read(bool bail, userrec* user)
{