]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/server.cpp
Remove unneeded ProtocolInterface::Introduce
[user/henk/code/inspircd.git] / src / server.cpp
index a87612449cff0c3f1818b0569e007bfdeadd035d..c5223561a4ee18d6e274b0e597a392e5904761ea 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.
@@ -16,6 +16,7 @@
 #include <signal.h>
 #include "exitcodes.h"
 #include "inspircd.h"
+#include "inspircd_version.h"
 
 
 void InspIRCd::SignalHandler(int signal)
@@ -36,6 +37,7 @@ void InspIRCd::Exit(int status)
 #ifdef WINDOWS
        if (WindowsIPC)
                delete WindowsIPC;
+       SetServiceStopped(status);
 #endif
        if (this)
        {
@@ -47,16 +49,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);
        }
 }
 
@@ -83,9 +82,9 @@ 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=" << 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 << "WALLCHOPS WALLVOICES MODES=" << Config->Limits.MaxModes - 1 << " CHANTYPES=# PREFIX=" << this->Modes->BuildPrefixes() << " MAP MAXCHANNELS=" << Config->MaxChans << " MAXBANS=60 VBANLIST NICKLEN=" << Config->Limits.NickMax - 1;
+       v << " CASEMAPPING=rfc1459 STATUSMSG=@" << (this->Config->AllowHalfop ? "%" : "") << "+ CHARSET=ascii TOPICLEN=" << Config->Limits.MaxTopic - 1 << " KICKLEN=" << Config->Limits.MaxKick - 1 << " MAXTARGETS=" << Config->MaxTargets - 1;
+       v << " AWAYLEN=" << Config->Limits.MaxAway - 1 << " 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();
@@ -145,7 +144,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