X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fserver.cpp;h=a73abcac271e2b06c05c78798bf04b1e7e8827d2;hb=d555db40f4b39f10ad06c2449b42711c1e74105f;hp=2722c6831966840b145ad9f0c59bce05e88c2499;hpb=b2b7bfd5e94760b3d4ab1832edd4e5a26b8b8fd9;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/server.cpp b/src/server.cpp index 2722c6831..a73abcac2 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -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 #include "exitcodes.h" #include "inspircd.h" @@ -38,19 +40,19 @@ 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() { - this->WriteOpers("*** Rehashing config file %s due to SIGHUP",ServerConfig::CleanFilename(this->ConfigFileName)); + this->SNO->WriteToSnoMask('A', "Rehashing config file %s due to SIGHUP",ServerConfig::CleanFilename(this->ConfigFileName)); this->CloseLog(); if (!this->OpenLog(this->Config->argv, this->Config->argc)) - this->WriteOpers("*** ERROR: Could not open logfile %s: %s", Config->logpath.c_str(), strerror(errno)); + this->SNO->WriteToSnoMask('A', "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,"")); @@ -59,9 +61,9 @@ void InspIRCd::Rehash() void InspIRCd::RehashServer() { - this->WriteOpers("*** Rehashing config file"); + this->SNO->WriteToSnoMask('A', "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();