]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
Better way even than suggested.
[user/henk/code/inspircd.git] / src / inspircd.cpp
index 47b6d278b44d8b29f66a74e1df1524bea33382e4..ce083b3b94ccfd1a90a28033528d30d1880f5c4a 100644 (file)
@@ -41,8 +41,6 @@ InspIRCd* SI = NULL;
 
 void InspIRCd::AddServerName(const std::string &servername)
 {
-       this->Log(DEBUG,"Adding server name: %s",servername.c_str());
-       
        if(find(servernames.begin(), servernames.end(), servername) == servernames.end())
                servernames.push_back(servername); /* Wasn't already there. */
 }
@@ -148,10 +146,18 @@ void InspIRCd::Rehash(int status)
        SI->RehashUsersAndChans();
        FOREACH_MOD_I(SI, I_OnGarbageCollect, OnGarbageCollect());
        SI->Config->Read(false,NULL);
+       SI->ResetMaxBans();
        SI->Res->Rehash();
        FOREACH_MOD_I(SI,I_OnRehash,OnRehash(NULL,""));
 }
 
+void InspIRCd::ResetMaxBans()
+{
+       for (chan_hash::const_iterator i = chanlist->begin(); i != chanlist->end(); i++)
+               i->second->ResetMaxBans();
+}
+
+
 /** Because hash_map doesnt free its buckets when we delete items (this is a 'feature')
  * we must occasionally rehash the hash (yes really).
  * We do this by copying the entries from the old hash to a new hash, causing all
@@ -401,10 +407,8 @@ InspIRCd::InspIRCd(int argc, char** argv)
        /* Add the listening sockets used for client inbound connections
         * to the socket engine
         */
-       this->Log(DEBUG,"%d listeners",stats->BoundPortCount);
        for (unsigned long count = 0; count < stats->BoundPortCount; count++)
        {
-               this->Log(DEBUG,"Add listener: %d",Config->openSockfd[count]->GetFd());
                if (!SE->AddFd(Config->openSockfd[count]))
                {
                        printf("\nEH? Could not add listener to socketengine. You screwed up, aborting.\n");
@@ -523,10 +527,6 @@ void InspIRCd::MoveTo(std::string modulename,int slot)
                        Config->implement_lists[slot][n] = x;
                }
        }
-       else
-       {
-               this->Log(DEBUG,"Move of %s to slot failed!",modulename.c_str());
-       }
 }
 
 void InspIRCd::MoveAfter(std::string modulename, std::string after)
@@ -692,8 +692,6 @@ bool InspIRCd::LoadModule(const char* filename)
                snprintf(MODERR,MAXBUF,"Module %s is not within the modules directory.",modfile);
                return false;
        }
-       this->Log(DEBUG,"Loading module: %s",modfile);
-
        if (ServerConfig::FileExists(modfile))
        {
 
@@ -821,7 +819,6 @@ void InspIRCd::DoOneIteration(bool process_module_sockets)
                        WriteOpers("*** \002EH?!\002 -- Time is flowing BACKWARDS in this dimension! Clock drifted backwards %d secs.",abs(OLDTIME-TIME));
                if ((TIME % 3600) == 0)
                {
-                       //MaintainWhoWas(this, TIME);
                        this->RehashUsersAndChans();
                        FOREACH_MOD_I(this, I_OnGarbageCollect, OnGarbageCollect());
                }