diff options
| author | 2019-03-30 22:06:19 +0000 | |
|---|---|---|
| committer | 2019-03-30 22:06:19 +0000 | |
| commit | 1fff2f7f87fa0e69494fe45902cfa315204d1e43 (patch) | |
| tree | b4f3eac01dc458cc7f3ab5b43a57c44d06044bed /src/modules/m_sslinfo.cpp | |
| parent | Remove the flashpolicyd module. (diff) | |
| parent | Rename OnClientProtocolPopulateTags to OnPopulateTags. (diff) | |
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/m_sslinfo.cpp')
| -rw-r--r-- | src/modules/m_sslinfo.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/modules/m_sslinfo.cpp b/src/modules/m_sslinfo.cpp index b6a208d39..1c5c4d8c9 100644 --- a/src/modules/m_sslinfo.cpp +++ b/src/modules/m_sslinfo.cpp @@ -21,6 +21,7 @@ #include "modules/ssl.h" #include "modules/webirc.h" #include "modules/whois.h" +#include "modules/who.h" enum { @@ -184,6 +185,7 @@ class ModuleSSLInfo : public Module , public WebIRC::EventListener , public Whois::EventListener + , public Who::EventListener { private: CommandSSLInfo cmd; @@ -197,6 +199,7 @@ class ModuleSSLInfo ModuleSSLInfo() : WebIRC::EventListener(this) , Whois::EventListener(this) + , Who::EventListener(this) , cmd(this) { } @@ -218,6 +221,19 @@ class ModuleSSLInfo } } + ModResult OnWhoLine(const Who::Request& request, LocalUser* source, User* user, Membership* memb, Numeric::Numeric& numeric) override + { + size_t flag_index; + if (!request.GetFieldIndex('f', flag_index)) + return MOD_RES_PASSTHRU; + + ssl_cert* cert = cmd.sslapi.GetCertificate(user); + if (cert) + numeric.GetParams()[flag_index].push_back('s'); + + return MOD_RES_PASSTHRU; + } + ModResult OnPreCommand(std::string& command, CommandBase::Params& parameters, LocalUser* user, bool validated) override { if ((command == "OPER") && (validated)) |
