summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-08-08 15:10:43 +0200
committerAttila Molnar <attilamolnar@hush.com>2016-08-08 15:10:43 +0200
commit8dbd80610aee01b8064ca813e1dd7ca44ab3f7b6 (patch)
treee9b8c765a412d957680acabdec7f04ff01082930 /src/modules
parent4d3601938593685b3f45439227838f16ee773cdc (diff)
Keep multiple IOHookProvider references in class ListenSocket
This adds the <bind:hook> config option which works together with <bind:ssl>
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_httpd.cpp4
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp9
2 files changed, 9 insertions, 4 deletions
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp
index 0b6b2e32b..64bef70d1 100644
--- a/src/modules/m_httpd.cpp
+++ b/src/modules/m_httpd.cpp
@@ -78,8 +78,8 @@ class HttpServerSocket : public BufferedSocket, public Timer, public insp::intru
{
ServerInstance->Timers.AddTimer(this);
- if (via->iohookprov)
- via->iohookprov->OnAccept(this, client, server);
+ if ((!via->iohookprovs.empty()) && (via->iohookprovs.back()))
+ via->iohookprovs.back()->OnAccept(this, client, server);
}
~HttpServerSocket()
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp
index 2198d6208..e1642a086 100644
--- a/src/modules/m_spanningtree/treesocket1.cpp
+++ b/src/modules/m_spanningtree/treesocket1.cpp
@@ -60,8 +60,13 @@ TreeSocket::TreeSocket(int newfd, ListenSocket* via, irc::sockets::sockaddrs* cl
capab = new CapabData;
capab->capab_phase = 0;
- if (via->iohookprov)
- via->iohookprov->OnAccept(this, client, server);
+ for (ListenSocket::IOHookProvList::iterator i = via->iohookprovs.begin(); i != via->iohookprovs.end(); ++i)
+ {
+ ListenSocket::IOHookProvRef& iohookprovref = *i;
+ if (iohookprovref)
+ iohookprovref->OnAccept(this, client, server);
+ }
+
SendCapabilities(1);
Utils->timeoutlist[this] = std::pair<std::string, int>(linkID, 30);