+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;
+ }
+ }
+}
+
+long Server::PriorityAfter(std::string modulename)
+{
+ for (unsigned int j = 0; j < Config->module_names.size(); j++)
+ {
+ if (Config->module_names[j] == modulename)
+ {
+ return ((j << 8) | PRIORITY_AFTER);
+ }
+ }
+ return PRIORITY_DONTCARE;
+}
+
+long Server::PriorityBefore(std::string modulename)
+{
+ for (unsigned int j = 0; j < Config->module_names.size(); j++)
+ {
+ if (Config->module_names[j] == modulename)
+ {
+ return ((j << 8) | PRIORITY_BEFORE);
+ }
+ }
+ return PRIORITY_DONTCARE;
+}
+