diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-08-29 21:15:07 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-08-29 21:15:07 +0000 |
commit | 9e9294bcda0be86d7fb518a45fa09cf45f7d4005 (patch) | |
tree | 98c7bb092e998285c9b9404ff55fcfc6b1f5e080 /src | |
parent | 7646da6fc4a9c44f13d2960a97c8b1005d0378de (diff) |
Safeguards
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10352 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index a6b0f3a40..43f3c9b64 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -244,6 +244,13 @@ void ModuleSpanningTree::DoPingChecks(time_t curtime) void ModuleSpanningTree::ConnectServer(Link* x) { bool ipvalid = true; + + if (InspIRCd::Match(ServerInstance->Config->ServerName, assign(x->Name))) + { + RemoteMessage(NULL, "CONNECT: Not connecting to myself."); + return; + } + QueryType start_type = DNS_QUERY_A; #ifdef IPV6 start_type = DNS_QUERY_AAAA; @@ -393,6 +400,12 @@ int ModuleSpanningTree::HandleConnect(const std::vector<std::string>& parameters { if (InspIRCd::Match(x->Name.c_str(),parameters[0])) { + if (InspIRCd::Match(ServerInstance->Config->ServerName, assign(x->Name))) + { + RemoteMessage(user, "*** CONNECT: Server \002%s\002 is ME, not connecting.",x->Name.c_str()); + return 1; + } + TreeServer* CheckDupe = Utils->FindServer(x->Name.c_str()); if (!CheckDupe) { |