diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-09 14:53:19 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-09 14:53:19 +0000 |
commit | ab46b96db4d457e6a4f2e978c38b79762cdeb9d5 (patch) | |
tree | 01b9489ae9804ee45b765ad7045efee54b34347b /src/modules.cpp | |
parent | f0680338833dd76966ba1769980abb9eafb50467 (diff) |
Move socket_ref and module_sockets vectors/arrays into InspIRCd*. These are public members, which InspSocket can modify.
(eventually, this will be marshalled safely through some accessors). When constructing an InspSocket you must now provide
an InspIRCd* instance to 'attach' the socket to.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4812 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules.cpp')
-rw-r--r-- | src/modules.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index e49975500..4b2d12cab 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -49,7 +49,6 @@ extern InspIRCd* ServerInstance; extern int MODCOUNT; extern ModuleList modules; extern FactoryList factory; -extern std::vector<InspSocket*> module_sockets; extern std::vector<userrec*> local_users; extern time_t TIME; extern userrec* fd_ref_table[MAX_DESCRIPTORS]; @@ -247,12 +246,12 @@ Server::~Server() void Server::AddSocket(InspSocket* sock) { - module_sockets.push_back(sock); + ServerInstance->module_sockets.push_back(sock); } void Server::RemoveSocket(InspSocket* sock) { - for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++) + for (std::vector<InspSocket*>::iterator a = ServerInstance->module_sockets.begin(); a < ServerInstance->module_sockets.end(); a++) { InspSocket* s = (InspSocket*)*a; if (s == sock) @@ -346,11 +345,11 @@ std::string Server::GetVersion() void Server::DelSocket(InspSocket* sock) { - for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++) + for (std::vector<InspSocket*>::iterator a = ServerInstance->module_sockets.begin(); a < ServerInstance->module_sockets.end(); a++) { if (*a == sock) { - module_sockets.erase(a); + ServerInstance->module_sockets.erase(a); return; } } |