diff options
Diffstat (limited to 'src/modules/m_sslinfo.cpp')
-rw-r--r-- | src/modules/m_sslinfo.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/modules/m_sslinfo.cpp b/src/modules/m_sslinfo.cpp index fc92bb17a..746ade2ac 100644 --- a/src/modules/m_sslinfo.cpp +++ b/src/modules/m_sslinfo.cpp @@ -20,6 +20,15 @@ #include "inspircd.h" #include "modules/ssl.h" +enum +{ + // From oftc-hybrid. + RPL_WHOISCERTFP = 276, + + // From UnrealIRCd. + RPL_WHOISSECURE = 671 +}; + class SSLCertExt : public ExtensionItem { public: SSLCertExt(Module* parent) @@ -162,10 +171,10 @@ class ModuleSSLInfo : public Module, public Whois::EventListener ssl_cert* cert = cmd.CertExt.get(whois.GetTarget()); if (cert) { - whois.SendLine(671, "is using a secure connection"); + whois.SendLine(RPL_WHOISSECURE, "is using a secure connection"); bool operonlyfp = ServerInstance->Config->ConfValue("sslinfo")->getBool("operonly"); if ((!operonlyfp || whois.IsSelfWhois() || whois.GetSource()->IsOper()) && !cert->fingerprint.empty()) - whois.SendLine(276, InspIRCd::Format("has client certificate fingerprint %s", cert->fingerprint.c_str())); + whois.SendLine(RPL_WHOISCERTFP, InspIRCd::Format("has client certificate fingerprint %s", cert->fingerprint.c_str())); } } |