diff options
| author | 2007-08-28 18:02:01 +0000 | |
|---|---|---|
| committer | 2007-08-28 18:02:01 +0000 | |
| commit | f83322c93800a528cf74811523ed90560092b715 (patch) | |
| tree | eb61cca00003f9a8f1a9f849ea1e3d7df75102df /src/modules/m_spanningtree/treesocket1.cpp | |
| parent | Rice it up, biatch (diff) | |
Tidy up duplicate code, provide GetSID() method on ServerConfig which returns the SID always 3 digits long
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7959 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/treesocket1.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/treesocket1.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index 91165824e..f2be6dd31 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -430,12 +430,6 @@ bool TreeSocket::Capab(const std::deque<std::string> ¶ms) } else if (params[0] == "END") { - std::string OurSID; - - OurSID += (char)((Instance->Config->sid / 100) + 48); - OurSID += (char)((Instance->Config->sid / 10) % 10 + 48); - OurSID += (char)(Instance->Config->sid % 10 + 48); - std::string reason; int ip6support = 0; #ifdef SUPPORT_IP6LINKS @@ -508,14 +502,14 @@ bool TreeSocket::Capab(const std::deque<std::string> ¶ms) if (!this->GetTheirChallenge().empty() && (this->LinkState == CONNECTING)) { this->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+this->MakePass(OutboundPass, this->GetTheirChallenge())+" 0 "+ - OurSID+" :"+this->Instance->Config->ServerDesc); + Instance->Config->GetSID()+" :"+this->Instance->Config->ServerDesc); } } else { /* They didnt specify a challenge or we don't have m_sha256.so, we use plaintext */ if (this->LinkState == CONNECTING) - this->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+OutboundPass+" 0 "+OurSID+" :"+this->Instance->Config->ServerDesc); + this->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+OutboundPass+" 0 "+Instance->Config->GetSID()+" :"+this->Instance->Config->ServerDesc); } if (reason.length()) |
