summaryrefslogtreecommitdiff
path: root/src/modules/m_sslinfo.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-08 23:29:21 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-08 23:29:21 +0000
commit7e843c22e16c81054bad18073d24fe1a07026431 (patch)
tree44ca0213c7d7a80270b993fec1fbed275ec56424 /src/modules/m_sslinfo.cpp
parentc440038736f749a56dbac1badee5b2f099286117 (diff)
Update Event and Request APIs
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11808 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_sslinfo.cpp')
-rw-r--r--src/modules/m_sslinfo.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/modules/m_sslinfo.cpp b/src/modules/m_sslinfo.cpp
index 1b5a39ba4..a1178f917 100644
--- a/src/modules/m_sslinfo.cpp
+++ b/src/modules/m_sslinfo.cpp
@@ -12,7 +12,7 @@
*/
#include "inspircd.h"
-#include "transport.h"
+#include "ssl.h"
/* $ModDesc: Provides SSL metadata, including /WHOIS information and /SSLINFO command */
@@ -125,15 +125,17 @@ class ModuleSSLInfo : public Module
Implementation eventlist[] = { I_OnWhois, I_OnPreCommand };
ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->PublishInterface("SSLCertInfo", this);
}
~ModuleSSLInfo()
{
+ ServerInstance->Modules->UnpublishInterface("SSLCertInfo", this);
}
Version GetVersion()
{
- return Version("SSL Certificate Utilities", VF_VENDOR);
+ return Version("SSL Certificate Utilities", VF_VENDOR | VF_SERVICEPROVIDER);
}
void OnWhois(User* source, User* dest)
@@ -224,19 +226,18 @@ class ModuleSSLInfo : public Module
return MOD_RES_PASSTHRU;
}
- const char* OnRequest(Request* request)
+ void OnRequest(Request& request)
{
- if (strcmp("GET_CERT", request->GetId()) == 0)
+ if (strcmp("GET_CERT", request.id) == 0)
{
- BufferedSocketCertificateRequest* req = static_cast<BufferedSocketCertificateRequest*>(request);
- req->cert = cmd.CertExt.get(req->item);
+ SSLCertificateRequest& req = static_cast<SSLCertificateRequest&>(request);
+ req.cert = cmd.CertExt.get(req.item);
}
- else if (strcmp("SET_CERT", request->GetId()) == 0)
+ else if (strcmp("SET_CERT", request.id) == 0)
{
- BufferedSocketFingerprintSubmission* req = static_cast<BufferedSocketFingerprintSubmission*>(request);
- cmd.CertExt.set(req->item, req->cert);
+ SSLCertSubmission& req = static_cast<SSLCertSubmission&>(request);
+ cmd.CertExt.set(req.item, req.cert);
}
- return NULL;
}
};