* ---------------------------------------------------
*/
+/* $Core: libIRCDserver */
+
#include <signal.h>
#include "exitcodes.h"
#include "inspircd.h"
void InspIRCd::Exit(int status)
{
+ printf("exit with status %d\n", status);
#ifdef WINDOWS
delete WindowsIPC;
#endif
{
this->SendError("Exiting with status " + ConvToStr(status) + " (" + std::string(ExitCodes[status]) + ")");
this->Cleanup();
- }
- exit (status);
+ }
+ printf("Exit done.\n");
+ exit (status);
}
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,""));
{
this->WriteOpers("*** Rehashing config file");
this->RehashUsersAndChans();
- this->Config->Read(false,NULL);
+ /*this->Config->Read(false,NULL);*/
this->ResetMaxBans();
this->Res->Rehash();
}
// 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();
if (current_uid[3] == 'Z')
{
- /* If we get to here, we need to wrap around to AAAA. */
- for(int j = 3; j < UUID_LENGTH - 1; j++)
- current_uid[j] = 'A';
+ /*
+ * Ugh. We have run out of room.. roll back around to the
+ * start of the UUID namespace. -- w00t
+ */
+ this->InitialiseUID();
/*
* and now we need to break the inner for () to continue the while (),