diff options
Diffstat (limited to 'src/modules/m_spanningtree/treesocket2.cpp')
-rw-r--r-- | src/modules/m_spanningtree/treesocket2.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index dd55e3ee6..c2664a65e 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -205,13 +205,6 @@ bool TreeSocket::ProcessLine(std::string &line) } break; - case LISTENER: - /* - * This really shouldn't happen. - */ - this->SendError("Internal error -- listening socket accepted its own descriptor!!!"); - return false; - break; case CONNECTING: /* * State CONNECTING: @@ -661,31 +654,4 @@ void TreeSocket::OnClose() } } -int TreeSocket::OnIncomingConnection(int newsock, char* ip) -{ - bool found = false; - - found = (std::find(Utils->ValidIPs.begin(), Utils->ValidIPs.end(), ip) != Utils->ValidIPs.end()); - if (!found) - { - for (std::vector<std::string>::iterator i = Utils->ValidIPs.begin(); i != Utils->ValidIPs.end(); i++) - { - if (*i == "*" || irc::sockets::MatchCIDR(ip, *i)) - { - found = true; - break; - } - } - - if (!found) - { - Utils->Creator->RemoteMessage(NULL,"Server connection from %s denied (no link blocks with that IP address)", ip); - Instance->SE->Close(newsock); - return false; - } - } - /* we don't need a pointer to this, creating it stores it in the necessary places */ - new TreeSocket(this->Utils, this->Instance, newsock, ip, this->Hook); - return true; -} |