summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index 4b8c0dffe..030007d1e 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -317,6 +317,23 @@ void Server::AddSocket(InspSocket* sock)
module_sockets.push_back(sock);
}
+void Server::RemoveSocket(InspSocket* sock)
+{
+ for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++)
+ {
+ InspSocket* s = (InspSocket*)*a;
+ if (s == sock)
+ {
+ log(DEBUG,"Forcibly removed socket");
+ ServerInstance->SE->DelFd(s->GetFd());
+ s->Close();
+ module_sockets.erase(a);
+ delete s;
+ return;
+ }
+ }
+}
+
void Server::RehashServer()
{
WriteOpers("*** Rehashing config file");