- std::string name = s->GetName();
- std::string burst = ":" + this->Instance->Config->GetSID() + " BURST " +ConvToStr(Instance->Time());
- std::string endburst = ":" + this->Instance->Config->GetSID() + " ENDBURST";
- this->Instance->SNO->WriteToSnoMask('l',"Bursting to \2%s\2 (Authentication: %s).", name.c_str(), this->GetTheirChallenge().empty() ? "plaintext password" : "SHA256-HMAC challenge-response");
- this->WriteLine(burst);
- /* send our version string */
- this->WriteLine(std::string(":")+this->Instance->Config->GetSID()+" VERSION :"+this->Instance->GetVersionString());
- /* Send server tree */
- this->SendServers(Utils->TreeRoot,s,1);
- /* Send users and their oper status */
- this->SendUsers(s);
- /* Send everything else (channel modes, xlines etc) */
- this->SendChannelModes(s);
- this->SendXLines(s);
- FOREACH_MOD_I(this->Instance,I_OnSyncOtherMetaData,OnSyncOtherMetaData((Module*)Utils->Creator,(void*)this));
- this->WriteLine(endburst);
- this->Instance->SNO->WriteToSnoMask('l',"Finished bursting to \2"+name+"\2.");
+ ServerInstance->SNO->WriteToSnoMask('l',"Bursting to \2%s\2 (Authentication: %s%s).",
+ s->GetName().c_str(),
+ capab->auth_fingerprint ? "SSL certificate fingerprint and " : "",
+ capab->auth_challenge ? "challenge-response" : "plaintext password");
+ this->CleanNegotiationInfo();
+ this->WriteLine(CmdBuilder("BURST").push_int(ServerInstance->Time()));
+ // Introduce all servers behind us
+ this->SendServers(Utils->TreeRoot, s);
+
+ BurstState bs(this);
+ // Introduce all users
+ this->SendUsers(bs);
+
+ // Sync all channels
+ const chan_hash& chans = ServerInstance->GetChans();
+ for (chan_hash::const_iterator i = chans.begin(); i != chans.end(); ++i)
+ SyncChannel(i->second, bs);
+
+ // Send all xlines
+ this->SendXLines();
+ FOREACH_MOD_CUSTOM(Utils->Creator->GetEventProvider(), ServerEventListener, OnSyncNetwork, (bs.server));
+ this->WriteLine(CmdBuilder("ENDBURST"));
+ ServerInstance->SNO->WriteToSnoMask('l',"Finished bursting to \2"+ s->GetName()+"\2.");
+
+ this->burstsent = true;
+}
+
+void TreeSocket::SendServerInfo(TreeServer* from)
+{
+ // Send public version string
+ this->WriteLine(CommandSInfo::Builder(from, "version", from->GetVersion()));
+
+ // Send full version string that contains more information and is shown to opers
+ this->WriteLine(CommandSInfo::Builder(from, "fullversion", from->GetFullVersion()));