From e2175e1b1a215010be1c3b960610c849c6090718 Mon Sep 17 00:00:00 2001 From: w00t Date: Mon, 8 Sep 2008 19:23:22 +0000 Subject: Remove old listening stuff from spanningtree, use a new derived listener class. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10472 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket2.cpp | 34 ------------------------------ 1 file changed, 34 deletions(-) (limited to 'src/modules/m_spanningtree/treesocket2.cpp') 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::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; -} -- cgit v1.3.1-10-gc9f91