]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
/who tidyup - needs QA'ing
[user/henk/code/inspircd.git] / src / inspircd.cpp
index c7e261e3b4cefc28e9a20ccf84a633d58d7b60d4..4b2690c49db2acc6dfef98fddd3161751c452d0d 100644 (file)
@@ -86,6 +86,13 @@ void InspIRCd::Cleanup()
        }
        stats->BoundPortCount = 0;
 
+       /* Close all client sockets, or the new process inherits them */
+       for (std::vector<userrec*>::const_iterator i = this->local_users.begin(); i != this->local_users.end(); i++)
+       {
+               (*i)->SetWriteError("Server shutdown");
+               (*i)->CloseSocket();
+       }
+
        /* We do this more than once, so that any service providers get a
         * chance to be unhooked by the modules using them, but then get
         * a chance to be removed themsleves.
@@ -103,10 +110,6 @@ void InspIRCd::Cleanup()
                        this->UnloadModule(mymodnames[k].c_str());
        }
 
-       /* Close all client sockets, or the new process inherits them */
-       for (std::vector<userrec*>::const_iterator i = this->local_users.begin(); i != this->local_users.end(); i++)
-               (*i)->CloseSocket();
-
        /* Close logging */
        this->Logger->Close();
 }
@@ -140,7 +143,7 @@ void InspIRCd::Start()
 
 void InspIRCd::Rehash(int status)
 {
-       SI->WriteOpers("Rehashing config file %s due to SIGHUP",ServerConfig::CleanFilename(CONFIG_FILE));
+       SI->WriteOpers("*** Rehashing config file %s due to SIGHUP",ServerConfig::CleanFilename(CONFIG_FILE));
        SI->CloseLog();
        SI->OpenLog(SI->Config->argv, SI->Config->argc);
        SI->RehashUsersAndChans();
@@ -148,6 +151,7 @@ void InspIRCd::Rehash(int status)
        SI->Config->Read(false,NULL);
        SI->ResetMaxBans();
        SI->Res->Rehash();
+       SI->BuildISupport();
        FOREACH_MOD_I(SI,I_OnRehash,OnRehash(NULL,""));
 }
 
@@ -574,7 +578,7 @@ void InspIRCd::BuildISupport()
 {
        // the neatest way to construct the initial 005 numeric, considering the number of configure constants to go in it...
        std::stringstream v;
-       v << "WALLCHOPS WALLVOICES MODES=" << MAXMODES << " CHANTYPES=# PREFIX=" << this->Modes->BuildPrefixes() << " MAP MAXCHANNELS=" << MAXCHANS << " MAXBANS=60 VBANLIST NICKLEN=" << NICKMAX-1;
+       v << "WALLCHOPS WALLVOICES MODES=" << MAXMODES << " CHANTYPES=# PREFIX=" << this->Modes->BuildPrefixes() << " MAP MAXCHANNELS=" << Config->MaxChans << " MAXBANS=60 VBANLIST NICKLEN=" << NICKMAX-1;
        v << " CASEMAPPING=rfc1459 STATUSMSG=@%+ CHARSET=ascii TOPICLEN=" << MAXTOPIC << " KICKLEN=" << MAXKICK << " MAXTARGETS=" << Config->MaxTargets << " AWAYLEN=";
        v << MAXAWAY << " CHANMODES=" << this->Modes->ChanModes() << " FNC NETWORK=" << Config->Network << " MAXPARA=32";
        Config->data005 = v.str();