summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp10
-rw-r--r--src/main.cpp4
-rw-r--r--src/servers.cpp8
3 files changed, 18 insertions, 4 deletions
diff --git a/src/init.cpp b/src/init.cpp
index da3c30587..aae8e9eb2 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -30,6 +30,16 @@ void introduce_user(const Anope::string &user)
if (user.empty())
ircdproto->SendBOB();
+
+ for (unsigned i = 0; i < Me->GetLinks().size(); ++i)
+ {
+ Server *s = Me->GetLinks()[i];
+
+ if (s->HasFlag(SERVER_JUPED))
+ {
+ ircdproto->SendServer(s);
+ }
+ }
/* We make the bots go online */
for (botinfo_map::const_iterator it = BotListByNick.begin(), it_end = BotListByNick.end(); it != it_end; ++it)
diff --git a/src/main.cpp b/src/main.cpp
index 79dcd3b00..64e755b7c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -541,7 +541,9 @@ int main(int ac, char **av, char **envp)
}
Me->SetFlag(SERVER_SYNCING);
- Me->ClearLinks();
+ for (unsigned i = Me->GetLinks().size(); i > 0; --i)
+ if (!Me->GetLinks()[i - 1]->HasFlag(SERVER_JUPED))
+ delete Me->GetLinks()[i - 1];
unsigned j = 0;
for (; j < (Config->MaxRetries ? Config->MaxRetries : j + 1); ++j)
diff --git a/src/servers.cpp b/src/servers.cpp
index d817ee94f..4b843411c 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -55,10 +55,12 @@ Flags<CapabType, CAPAB_END> Capab;
* @param hops Hops from services server
* @param description Server rdescription
* @param sid Server sid/numeric
+ * @param flag An optional server flag
*/
-Server::Server(Server *uplink, const Anope::string &name, unsigned hops, const Anope::string &description, const Anope::string &sid) : Name(name), Hops(hops), Description(description), SID(sid), UplinkServer(uplink)
+Server::Server(Server *uplink, const Anope::string &name, unsigned hops, const Anope::string &description, const Anope::string &sid, ServerFlag flag) : Name(name), Hops(hops), Description(description), SID(sid), UplinkServer(uplink)
{
- SetFlag(SERVER_SYNCING);
+ this->SetFlag(SERVER_SYNCING);
+ this->SetFlag(flag);
Log(this, "connect") << "uplinked to " << (this->UplinkServer ? this->UplinkServer->GetName() : "no uplink") << " connected to the network";
@@ -68,7 +70,7 @@ Server::Server(Server *uplink, const Anope::string &name, unsigned hops, const A
this->UplinkServer->AddLink(this);
/* Check to be sure the uplink server only has one uplink, otherwise we introduce our clients if we jupe servers */
- if (Me == this->UplinkServer && this->UplinkServer->GetLinks().size() == 1)
+ if (Me == this->UplinkServer && !this->HasFlag(SERVER_JUPED))
{
/* Bring in our pseudo-clients */
introduce_user("");