diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-14 18:33:22 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-14 18:33:22 +0000 |
commit | d0f0cbea0727e3a3f670a308b173559061a0ca1d (patch) | |
tree | 4d47bb09ed6d33f957a89a1c131249617cc13878 | |
parent | bd8175272f71eaa298262de7f6c140035273b263 (diff) |
Removed externs for module_sockets
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2442 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | include/inspircd.h | 2 | ||||
-rw-r--r-- | src/userprocess.cpp | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index bb96ae32b..fb978f704 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -42,6 +42,7 @@ #include "inspircd_util.h" #include "users.h" #include "channels.h" +#include "sockets.h" // some misc defines @@ -102,6 +103,7 @@ class InspIRCd public: time_t startup_time; + std::vector<InspSocket*> module_sockets; InspIRCd(int argc, char** argv); int Run(); diff --git a/src/userprocess.cpp b/src/userprocess.cpp index d67a85e78..fd1976a22 100644 --- a/src/userprocess.cpp +++ b/src/userprocess.cpp @@ -64,7 +64,6 @@ extern struct sockaddr_in client,server; extern socklen_t length; extern std::vector<Module*> modules; extern std::vector<ircd_module*> factory; -extern std::vector<InspSocket*> module_sockets; extern time_t TIME; extern time_t OLDTIME; @@ -248,8 +247,8 @@ void ProcessUser(userrec* cu) */ bool DoBackgroundUserStuff(time_t TIME) { - unsigned int numsockets = module_sockets.size(); - for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++) + unsigned int numsockets = ServerInstance->module_sockets.size(); + for (std::vector<InspSocket*>::iterator a = ServerInstance->module_sockets.begin(); a < ServerInstance->module_sockets.end(); a++) { InspSocket* s = (InspSocket*)*a; if (s->Timeout(TIME)) @@ -257,11 +256,11 @@ bool DoBackgroundUserStuff(time_t TIME) log(DEBUG,"Socket poll returned false, close and bail"); SE->DelFd(s->GetFd()); s->Close(); - module_sockets.erase(a); + ServerInstance->module_sockets.erase(a); delete s; break; } - if (module_sockets.size() != numsockets) break; + if (ServerInstance->module_sockets.size() != numsockets) break; } /* TODO: We need a seperate hash containing only local users for this */ |