diff options
author | Adam <Adam@anope.org> | 2010-12-18 19:41:13 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-12-18 19:41:13 -0500 |
commit | 0d20c4770350f30cfa5563c913464a37fdf9a067 (patch) | |
tree | 451a70e35cb0789f5935cbef5aba7f61de9561ea /src/init.cpp | |
parent | 7f9a5e01c69c7e7ede69c3799ff2be0402f6d7fa (diff) |
Don't send SXLines until after we start bursting with our uplink
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/src/init.cpp b/src/init.cpp index 81b9c2c36..3fb8f55a4 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -23,8 +23,28 @@ void introduce_user(const Anope::string &user) throw FatalException("introduce_user loop detected"); lasttime = now; - if (user.empty()) - ircdproto->SendBOB(); + if (!user.empty()) + { + User *u = finduser(user); + if (u) + { + ircdproto->SendClientIntroduction(u, ircd->pseudoclient_mode); + + BotInfo *bi = findbot(u->nick); + if (bi) + { + XLine x(bi->nick, "Reserved for services"); + ircdproto->SendSQLine(&x); + + for (UChannelList::const_iterator cit = bi->chans.begin(), cit_end = bi->chans.end(); cit != cit_end; ++cit) + ircdproto->SendJoin(bi, *cit); + } + } + + return; + } + + ircdproto->SendBOB(); for (unsigned i = 0; i < Me->GetLinks().size(); ++i) { @@ -41,7 +61,7 @@ void introduce_user(const Anope::string &user) { User *u = *it; - if (user.empty() || u->nick.equals_ci(user)) + if (u->nick.equals_ci(user)) { ircdproto->SendClientIntroduction(u, ircd->pseudoclient_mode); @@ -52,19 +72,17 @@ void introduce_user(const Anope::string &user) ircdproto->SendSQLine(&x); for (UChannelList::const_iterator cit = bi->chans.begin(), cit_end = bi->chans.end(); cit != cit_end; ++cit) - { ircdproto->SendJoin(bi, *cit); - } } } } - if (user.empty()) - { - /* Load MLock from the database now that we know what modes exist */ - for (registered_channel_map::iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it) - it->second->LoadMLock(); - } + /* Load MLock from the database now that we know what modes exist */ + for (registered_channel_map::iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it) + it->second->LoadMLock(); + + /* Add our SXLines */ + XLineManager::Burst(); } /*************************************************************************/ |