X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Finspircd.cpp;h=23ef19aef771a969ffc71039882c4efafacf0ec0;hb=48045988a48a738a1ffa183fdc1e335a431312a8;hp=11ea679e791d839306c3efc0d4f0a3c21973b152;hpb=52149814e30b4471588f9dba9b2661b0283bd57f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 11ea679e7..23ef19aef 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -11,6 +11,7 @@ * --------------------------------------------------- */ +/* $Core */ /* $Install: src/inspircd $(BINPATH) */ #include "inspircd.h" #include @@ -325,7 +326,6 @@ InspIRCd::InspIRCd(int argc, char** argv) HandleProcessUser(this), HandleIsNick(this), HandleIsIdent(this), - HandleFindDescriptor(this), HandleFloodQuitUser(this), HandleIsChannel(this), HandleIsSID(this), @@ -342,7 +342,6 @@ InspIRCd::InspIRCd(int argc, char** argv) Rehash(&HandleRehash), IsNick(&HandleIsNick), IsIdent(&HandleIsIdent), - FindDescriptor(&HandleFindDescriptor), FloodQuitUser(&HandleFloodQuitUser) { @@ -611,8 +610,8 @@ InspIRCd::InspIRCd(int argc, char** argv) } /* set up fake client again this time with the correct uid */ - this->FakeClient = new User(this, "#INVALID"); - this->FakeClient->SetFd(FD_MAGIC_NUMBER); + this->FakeClient = new FakeUser(this, "!"); + this->FakeClient->SetFakeServer(Config->ServerName); // Get XLine to do it's thing. this->XLines->CheckELines(); @@ -776,11 +775,9 @@ int InspIRCd::Run() this->Logs->Log("CONFIG",DEBUG,"Detected ConfigThread exiting, tidying up..."); - /* These are currently not known to be threadsafe, so they are executed outside - * of the thread. It would be pretty simple to move them to the thread Run method - * once they are known threadsafe with all the correct mutexes in place. This might - * not be worth the effort however as these functions execute relatively quickly - * and would not benefit from being within the config read thread. + /* + * Apply the changed configuration from the rehash. This is not done within the + * configuration thread becasuse they may invoke functions that are not threadsafe. * * XXX: The order of these is IMPORTANT, do not reorder them without testing * thoroughly!!! @@ -791,13 +788,9 @@ int InspIRCd::Run() this->ResetMaxBans(); InitializeDisabledCommands(Config->DisabledCommands, this); User* user = !Config->RehashUserUID.empty() ? FindNick(Config->RehashUserUID) : NULL; - FOREACH_MOD_I(this, I_OnRehash, OnRehash(user, Config->RehashParameter)); + FOREACH_MOD_I(this, I_OnRehash, OnRehash(user)); this->BuildISupport(); - /* IMPORTANT: This delete may hang if you fuck up your thread syncronization. - * It will hang waiting for the ConfigThread to 'join' to avoid race conditons, - * until the other thread is completed. - */ delete ConfigThread; ConfigThread = NULL; }