summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-19 15:23:10 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-19 15:23:10 +0000
commitd75c56e70092c7f27f0571bd81350acb439dfa42 (patch)
treede47e694c80cca716cfd45f2fe0e01b374355c01 /src/modules
parent7d2c132c83a9668c0f11eb011f5774aa99cd93c8 (diff)
Changed AES negotiation to occur before SERVER
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2574 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 036cb2798..09a3b2c56 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -615,6 +615,11 @@ class TreeSocket : public InspSocket
{
if (x->Name == this->myhost)
{
+ if (x->EncryptionKey != "")
+ {
+ this->WriteLine("AES "+Srv->GetServerName());
+ this->InitAES(x->EncryptionKey);
+ }
/* found who we're supposed to be connecting to, send the neccessary gubbins. */
this->WriteLine("SERVER "+Srv->GetServerName()+" "+x->SendPass+" 0 :"+Srv->GetServerDescription());
return true;
@@ -1706,6 +1711,19 @@ class TreeSocket : public InspSocket
command = params[0];
params.pop_front();
}
+
+ if ((!this->ctx) && (command == "AES"))
+ {
+ std::string sserv = params[0];
+ for (std::vector<Link>::iterator x = LinkBlocks.begin(); x < LinkBlocks.end(); x++)
+ {
+ if ((x->EncryptionKey != "") && (x->Name == sserv))
+ {
+ this->InitAES(x->EncryptionKey);
+ }
+ }
+ return true;
+ }
switch (this->LinkState)
{
@@ -1910,16 +1928,6 @@ class TreeSocket : public InspSocket
else if (command == "ENDBURST")
{
this->bursting = false;
- std::string sserv = this->myhost;
- if (this->InboundServerName != "")
- sserv = this->InboundServerName;
- for (std::vector<Link>::iterator x = LinkBlocks.begin(); x < LinkBlocks.end(); x++)
- {
- if ((x->EncryptionKey != "") && (x->Name == sserv))
- {
- this->InitAES(x->EncryptionKey);
- }
- }
return true;
}
else