summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-09 14:53:19 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-09 14:53:19 +0000
commitab46b96db4d457e6a4f2e978c38b79762cdeb9d5 (patch)
tree01b9489ae9804ee45b765ad7045efee54b34347b /src/inspircd.cpp
parentf0680338833dd76966ba1769980abb9eafb50467 (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/inspircd.cpp')
-rw-r--r--src/inspircd.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index c92e862b0..242183303 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -70,7 +70,6 @@ InspIRCd* ServerInstance;
extern ModuleList modules;
extern FactoryList factory;
-std::vector<InspSocket*> module_sockets;
std::vector<userrec*> local_users;
extern int MODCOUNT;
@@ -81,7 +80,6 @@ int iterations = 0;
insp_sockaddr client, server;
socklen_t length;
-extern InspSocket* socket_ref[MAX_DESCRIPTORS];
time_t TIME = time(NULL), OLDTIME = time(NULL);
// This table references users by file descriptor.
@@ -236,7 +234,7 @@ InspIRCd::InspIRCd(int argc, char** argv)
this->Config = new ServerConfig;
ServerInstance = this;
this->Start();
- module_sockets.clear();
+ this->module_sockets.clear();
this->startup_time = time(NULL);
srand(time(NULL));
log(DEBUG,"*** InspIRCd starting up!");
@@ -756,7 +754,7 @@ void InspIRCd::DoOneIteration(bool process_module_sockets)
* hit at all.
*/
if (process_module_sockets)
- DoSocketTimeouts(TIME);
+ DoSocketTimeouts(TIME,this);
TickTimers(TIME);
@@ -802,13 +800,13 @@ void InspIRCd::DoOneIteration(bool process_module_sockets)
* Modules are encouraged to inherit their sockets from
* InspSocket so we can process them neatly like this.
*/
- s = socket_ref[activefds[activefd]];
+ s = this->socket_ref[activefds[activefd]];
if ((s) && (!s->Poll()))
{
log(DEBUG,"Socket poll returned false, close and bail");
SE->DelFd(s->GetFd());
- socket_ref[activefds[activefd]] = NULL;
+ this->socket_ref[activefds[activefd]] = NULL;
for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++)
{
s_del = *a;