]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/server.cpp
Make rehash generate a new ServerInstance->Config object
[user/henk/code/inspircd.git] / src / server.cpp
index d8ab7642592a6f876bd877fb76b5c25a5f9cd1c7..01f523e4708ff5af90efed6af6b4f82210cbeaaf 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *         the file COPYING for details.
@@ -48,16 +48,13 @@ void InspIRCd::Exit(int status)
 
 void RehashHandler::Call(const std::string &reason)
 {
-       Server->SNO->WriteToSnoMask('A', "Rehashing config file %s %s",ServerConfig::CleanFilename(Server->ConfigFileName), reason.c_str());
+       Server->SNO->WriteToSnoMask('a', "Rehashing config file %s %s",ServerConfig::CleanFilename(Server->ConfigFileName), reason.c_str());
        Server->RehashUsersAndChans();
        FOREACH_MOD_I(Server, I_OnGarbageCollect, OnGarbageCollect());
        if (!Server->ConfigThread)
        {
-               Server->Config->RehashUser = NULL;
-               Server->Config->RehashParameter = "";
-
-               Server->ConfigThread = new ConfigReaderThread(Server, false, NULL);
-               Server->Threads->Create(Server->ConfigThread);
+               Server->ConfigThread = new ConfigReaderThread(Server, "");
+               Server->Threads->Start(Server->ConfigThread);
        }
 }
 
@@ -86,7 +83,7 @@ void InspIRCd::BuildISupport()
        std::stringstream v;
        v << "WALLCHOPS WALLVOICES MODES=" << Config->Limits.MaxModes << " CHANTYPES=# PREFIX=" << this->Modes->BuildPrefixes() << " MAP MAXCHANNELS=" << Config->MaxChans << " MAXBANS=60 VBANLIST NICKLEN=" << Config->Limits.NickMax;
        v << " CASEMAPPING=rfc1459 STATUSMSG=@" << (this->Config->AllowHalfop ? "%" : "") << "+ CHARSET=ascii TOPICLEN=" << Config->Limits.MaxTopic << " KICKLEN=" << Config->Limits.MaxKick << " MAXTARGETS=" << Config->MaxTargets;
-       v << " AWAYLEN=" << Config->Limits.MaxAway << " CHANMODES=" << this->Modes->ChanModes() << " FNC NETWORK=" << Config->Network << " MAXPARA=32 ELIST=MU";
+       v << " AWAYLEN=" << Config->Limits.MaxAway << " CHANMODES=" << this->Modes->GiveModeList(MASK_CHANNEL) << " FNC NETWORK=" << Config->Network << " MAXPARA=32 ELIST=MU";
        Config->data005 = v.str();
        FOREACH_MOD_I(this,I_On005Numeric,On005Numeric(Config->data005));
        Config->Update005();
@@ -146,7 +143,7 @@ void InspIRCd::IncrementUID(int pos)
                        for (int i = 3; i < UUID_LENGTH; i++)
                        {
                                current_uid[i] = 'A';
-                               pos  = UUID_LENGTH - 1; 
+                               pos  = UUID_LENGTH - 1;
                        }
                }
                else