summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_spanningtree/main.cpp5
-rw-r--r--src/modules/m_spanningtree/main.h4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index de1e8eb19..920840f9b 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -45,6 +45,7 @@ ModuleSpanningTree::ModuleSpanningTree()
, commands(this)
, currmembid(0)
, eventprov(this, "event/server")
+ , sslapi(this)
, DNS(this, "DNS")
, tagevprov(this, "event/messagetag")
, loopCall(false)
@@ -447,6 +448,10 @@ void ModuleSpanningTree::OnUserConnect(LocalUser* user)
if (user->quitting)
return;
+ // Create the lazy ssl_cert metadata for this user if not already created.
+ if (sslapi)
+ sslapi->GetCertificate(user);
+
CommandUID::Builder(user).Broadcast();
if (user->IsOper())
diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h
index fa2928687..ec97e73be 100644
--- a/src/modules/m_spanningtree/main.h
+++ b/src/modules/m_spanningtree/main.h
@@ -26,6 +26,7 @@
#include "inspircd.h"
#include "event.h"
#include "modules/dns.h"
+#include "modules/ssl.h"
#include "modules/stats.h"
#include "servercommand.h"
#include "commands.h"
@@ -80,6 +81,9 @@ class ModuleSpanningTree
*/
Events::ModuleEventProvider eventprov;
+ /** API for accessing user SSL certificates. */
+ UserCertificateAPI sslapi;
+
public:
dynamic_reference<DNS::Manager> DNS;