diff options
| author | 2010-02-17 17:22:23 -0600 | |
|---|---|---|
| committer | 2010-08-03 17:32:36 -0400 | |
| commit | 0584675861f05321b89fff44fda38ebd49006e54 (patch) | |
| tree | a8cd3ac16fc68d78aeacfb9d1c745cf8311f0bdb /src/modules/m_httpd.cpp | |
| parent | Remove useless return value from OnUserRegister (diff) | |
New I/O hook API
This removes some pointless Module:: entries, uses the ServiceProvider
lookup API for bind tags, and allows GnuTLS to use custom certificates
per bind or link block using:
<bind ssl="gnutls" ssl_cert="signed" ...>
<ssl_cert name="signed" certfile="my.cert.pem" keyfile="my.key.pem">
Diffstat (limited to 'src/modules/m_httpd.cpp')
| -rw-r--r-- | src/modules/m_httpd.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 8aab3a6a4..a23072500 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -52,10 +52,6 @@ class HttpServerSocket : public BufferedSocket : BufferedSocket(newfd), ip(IP), postsize(0) { InternalState = HTTP_SERVE_WAIT_REQUEST; - - FOREACH_MOD(I_OnHookIO, OnHookIO(this, via)); - if (GetIOHook()) - GetIOHook()->OnStreamSocketAccept(this, client, server); } virtual void OnError(BufferedSocketError) @@ -339,15 +335,14 @@ class ModuleHttpServer : public Module resp.src.sock->Page(resp.document, resp.responsecode, &resp.headers); } - ModResult OnAcceptConnection(int nfd, ListenSocket* from, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server) + StreamSocket* OnAcceptConnection(int nfd, ListenSocket* from, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server) { if (from->bind_tag->getString("type") != "httpd") - return MOD_RES_PASSTHRU; + return NULL; int port; std::string incomingip; irc::sockets::satoap(*client, incomingip, port); - new HttpServerSocket(nfd, incomingip, from, client, server); - return MOD_RES_ALLOW; + return new HttpServerSocket(nfd, incomingip, from, client, server); } |
