diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-07-27 18:39:01 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-07-27 18:39:01 +0200 |
commit | 2a924db786cfb2531126f56a8227bd46c63e444c (patch) | |
tree | db62e441d23399802e5d9739ec3f2bbeba3919d0 /src | |
parent | fe609b6bd81b6c16a9263aee586ce6824a994301 (diff) |
m_spanningtree Keep track of whether we've sent our burst, to be used for translation
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree/netburst.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket.h | 6 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket1.cpp | 4 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index a8d76becc..b81a285b5 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -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) diff --git a/src/modules/m_spanningtree/treesocket.h b/src/modules/m_spanningtree/treesocket.h index 2a47da39b..f16808519 100644 --- a/src/modules/m_spanningtree/treesocket.h +++ b/src/modules/m_spanningtree/treesocket.h @@ -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); diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index 931bd3f9f..97c83bbfb 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -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; |