]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_spanningtree Replace manual string building of outgoing commands with CmdBuilder...
authorAttila Molnar <attilamolnar@hush.com>
Thu, 3 Jul 2014 10:42:36 +0000 (12:42 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Thu, 3 Jul 2014 10:42:36 +0000 (12:42 +0200)
src/modules/m_spanningtree/main.cpp
src/modules/m_spanningtree/netburst.cpp
src/modules/m_spanningtree/nickcollide.cpp

index 9a924fea9923d62ca43fdfff1abdf3169e0505c7..e10781198dca3f080887f9898dd542ccb910c16b 100644 (file)
@@ -189,7 +189,7 @@ restart:
                        {
                                // They did, send a ping to them
                                s->SetNextPingTime(curtime + Utils->PingFreq);
-                               s->GetSocket()->WriteLine(":" + ServerInstance->Config->GetSID() + " PING " + s->GetID());
+                               s->GetSocket()->WriteLine(CmdBuilder("PING").push(s->GetID()));
                                s->LastPingMsec = ts;
                        }
                        else
index ed2bd0756abc7dd717c2bea7fd9b43620e13dc34..f96e47d6053ea0722f12d56798cb2ea7467cbd8a 100644 (file)
@@ -107,7 +107,7 @@ void TreeSocket::DoBurst(TreeServer* s)
                capab->auth_fingerprint ? "SSL Fingerprint and " : "",
                capab->auth_challenge ? "challenge-response" : "plaintext password");
        this->CleanNegotiationInfo();
-       this->WriteLine(":" + ServerInstance->Config->GetSID() + " BURST " + ConvToStr(ServerInstance->Time()));
+       this->WriteLine(CmdBuilder("BURST").push_int(ServerInstance->Time()));
        /* Send server tree */
        this->SendServers(Utils->TreeRoot, s);
 
@@ -121,7 +121,7 @@ void TreeSocket::DoBurst(TreeServer* s)
 
        this->SendXLines();
        FOREACH_MOD(OnSyncNetwork, (bs.server));
-       this->WriteLine(":" + ServerInstance->Config->GetSID() + " ENDBURST");
+       this->WriteLine(CmdBuilder("ENDBURST"));
        ServerInstance->SNO->WriteToSnoMask('l',"Finished bursting to \2"+ s->GetName()+"\2.");
 }
 
index 935ccd6bdd53a805e21024277c53d949fcf91412..e6bcb21b29cf6f36a0b8f8a7e83b345f8d98f5c7 100644 (file)
@@ -128,7 +128,7 @@ int SpanningTreeUtilities::DoCollision(User* u, TreeServer* server, time_t remot
                 * so other servers don't need to see the SAVE
                 */
                TreeSocket* sock = server->GetSocket();
-               sock->WriteLine(":"+ServerInstance->Config->GetSID()+" SAVE "+remoteuid+" "+ ConvToStr(remotets));
+               sock->WriteLine(CmdBuilder("SAVE").push(remoteuid).push_int(remotets));
 
                if (remote)
                {