1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 09:16:38 +02:00

Rethink jupe/squit thing somewhat. Workaround for the inspircd rsquit/squit mess

This commit is contained in:
Adam
2013-07-26 21:40:16 -04:00
parent f0f43cf426
commit fde83f6564
11 changed files with 182 additions and 157 deletions
+20 -1
View File
@@ -428,6 +428,15 @@ void Anope::Init(int ac, char **av)
/* Write our PID to the PID file. */
write_pidfile();
/* Create me */
Configuration::Block *block = Config->GetBlock("serverinfo");
Me = new Server(NULL, block->Get<const Anope::string>("name"), 0, block->Get<const Anope::string>("description"), block->Get<const Anope::string>("id"));
for (botinfo_map::const_iterator it = BotListByNick->begin(), it_end = BotListByNick->end(); it != it_end; ++it)
{
it->second->server = Me;
++Me->users;
}
/* Announce ourselves to the logfile. */
Log() << "Anope " << Anope::Version() << " starting up" << (Anope::Debug || Anope::ReadOnly ? " (options:" : "") << (Anope::Debug ? " debug" : "") << (Anope::ReadOnly ? " readonly" : "") << (Anope::Debug || Anope::ReadOnly ? ")" : "");
@@ -437,7 +446,7 @@ void Anope::Init(int ac, char **av)
Language::InitLanguages();
/* Initialize random number generator */
Configuration::Block *block = Config->GetBlock("options");
block = Config->GetBlock("options");
srand(block->Get<unsigned>("seed"));
/* load modules */
@@ -451,6 +460,16 @@ void Anope::Init(int ac, char **av)
Log() << "Using IRCd protocol " << protocol->name;
/* Auto assign sid if applicable */
if (IRCD->RequiresID)
{
Anope::string sid = Servers::TS6_SID_Retrieve();
if (Me->GetSID() == Me->GetName())
Me->SetSID(sid);
for (botinfo_map::iterator it = BotListByNick->begin(), it_end = BotListByNick->end(); it != it_end; ++it)
it->second->GenerateUID();
}
/* Load up databases */
Log() << "Loading databases...";
EventReturn MOD_RESULT;