]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_spanningtree Keep track of whether we've sent our burst, to be used for translation
authorAttila Molnar <attilamolnar@hush.com>
Sun, 27 Jul 2014 16:39:01 +0000 (18:39 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Sun, 27 Jul 2014 16:39:01 +0000 (18:39 +0200)
src/modules/m_spanningtree/netburst.cpp
src/modules/m_spanningtree/treesocket.h
src/modules/m_spanningtree/treesocket1.cpp

index a8d76becc74c08cce1afa668aa84211b4c727a12..b81a285b574cab1ccd17af39f44f30c222f78b88 100644 (file)
@@ -123,6 +123,8 @@ void TreeSocket::DoBurst(TreeServer* s)
        FOREACH_MOD(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)
index 2a47da39bcdc05d8af6986ca2781fe63af181615..f168085192c3f663fb2cba2efc90192dc51cbadf 100644 (file)
@@ -100,6 +100,12 @@ class TreeSocket : public BufferedSocket
        int proto_version;                      /* Remote protocol version */
        bool ConnectionFailureShown; /* Set to true if a connection failure message was shown */
 
+       /** True if we've sent our burst.
+        * This only changes the behavior of message translation for 1202 protocol servers and it can be
+        * removed once 1202 support is dropped.
+        */
+       bool burstsent;
+
        /** Checks if the given servername and sid are both free
         */
        bool CheckDuplicate(const std::string& servername, const std::string& sid);
index 931bd3f9f4fcacb32cbba9667ed17e0fd6e1108d..97c83bbfbca1562a07eded1026f03bfe59ad052f 100644 (file)
@@ -38,7 +38,7 @@
  */
 TreeSocket::TreeSocket(Link* link, Autoconnect* myac, const std::string& ipaddr)
        : linkID(assign(link->Name)), LinkState(CONNECTING), MyRoot(NULL), proto_version(0), ConnectionFailureShown(false)
-       , age(ServerInstance->Time())
+       , burstsent(false), age(ServerInstance->Time())
 {
        capab = new CapabData;
        capab->link = link;
@@ -57,7 +57,7 @@ TreeSocket::TreeSocket(Link* link, Autoconnect* myac, const std::string& ipaddr)
 TreeSocket::TreeSocket(int newfd, ListenSocket* via, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server)
        : BufferedSocket(newfd)
        , linkID("inbound from " + client->addr()), LinkState(WAIT_AUTH_1), MyRoot(NULL), proto_version(0)
-       , ConnectionFailureShown(false), age(ServerInstance->Time())
+       , ConnectionFailureShown(false), burstsent(false), age(ServerInstance->Time())
 {
        capab = new CapabData;
        capab->capab_phase = 0;