]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/server.cpp
Header update: 2007 -> 2008
[user/henk/code/inspircd.git] / src / server.cpp
index 2722c6831966840b145ad9f0c59bce05e88c2499..c72ac1f912a8ad5e228a36ce8d962b66fa8b6f28 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -11,6 +11,8 @@
  * ---------------------------------------------------
  */
 
+/* $Core: libIRCDserver */
+
 #include <signal.h>
 #include "exitcodes.h"
 #include "inspircd.h"
@@ -38,8 +40,8 @@ void InspIRCd::Exit(int status)
        {
                this->SendError("Exiting with status " + ConvToStr(status) + " (" + std::string(ExitCodes[status]) + ")");
                this->Cleanup();
-    }
-    exit (status);
+       }
+       exit (status);
 }
 
 void InspIRCd::Rehash()
@@ -50,7 +52,7 @@ void InspIRCd::Rehash()
                this->WriteOpers("*** ERROR: Could not open logfile %s: %s", Config->logpath.c_str(), strerror(errno));
        this->RehashUsersAndChans();
        FOREACH_MOD_I(this, I_OnGarbageCollect, OnGarbageCollect());
-       this->Config->Read(false,NULL);
+       /*this->Config->Read(false,NULL);*/
        this->ResetMaxBans();
        this->Res->Rehash();
        FOREACH_MOD_I(this,I_OnRehash,OnRehash(NULL,""));
@@ -61,7 +63,7 @@ void InspIRCd::RehashServer()
 {
        this->WriteOpers("*** Rehashing config file");
        this->RehashUsersAndChans();
-       this->Config->Read(false,NULL);
+       /*this->Config->Read(false,NULL);*/
        this->ResetMaxBans();
        this->Res->Rehash();
 }
@@ -75,7 +77,7 @@ std::string InspIRCd::GetVersionString()
        }
        else
        {
-               snprintf(versiondata,MAXBUF,"%s %s :%s [FLAGS=%s,%s,%d]",VERSION,Config->ServerName,SYSTEM,REVISION,SE->GetName().c_str(),Config->sid);
+               snprintf(versiondata,MAXBUF,"%s %s :%s [FLAGS=%s,%s,%s]",VERSION,Config->ServerName,SYSTEM,REVISION,SE->GetName().c_str(),Config->sid);
        }
        return versiondata;
 }
@@ -85,8 +87,8 @@ 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=" << 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 ELIST=MU";
+       v << " CASEMAPPING=rfc1459 STATUSMSG=@" << (this->Config->AllowHalfop ? "%" : "") << "+ CHARSET=ascii TOPICLEN=" << MAXTOPIC << " KICKLEN=" << MAXKICK << " MAXTARGETS=" << Config->MaxTargets;
+       v << " AWAYLEN=" << MAXAWAY << " CHANMODES=" << this->Modes->ChanModes() << " FNC NETWORK=" << Config->Network << " MAXPARA=32 ELIST=MU";
        Config->data005 = v.str();
        FOREACH_MOD_I(this,I_On005Numeric,On005Numeric(Config->data005));
        Config->Update005();