diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-07-02 18:17:26 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-07-02 18:17:26 +0000 |
commit | 2db8cb45f87b0406e88f6ecf6a46eb15f5238684 (patch) | |
tree | 86331d2a2dcfaa4be98a624c9633555a6fb6c231 /src/modules/m_ssl_data.cpp | |
parent | e1eb3b72f672401b31da8faa229dfacd50b38583 (diff) |
Remove memory-wasting map in ssl_cert
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11428 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_ssl_data.cpp')
-rw-r--r-- | src/modules/m_ssl_data.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/modules/m_ssl_data.cpp b/src/modules/m_ssl_data.cpp index 0ce760971..2cc712c65 100644 --- a/src/modules/m_ssl_data.cpp +++ b/src/modules/m_ssl_data.cpp @@ -96,25 +96,19 @@ class ModuleSSLData : public Module std::string v; getline(s,v,' '); - cert->data.insert(std::make_pair("invalid", ConvToStr(v.find('v') != std::string::npos))); - cert->data.insert(std::make_pair("trusted", ConvToStr(v.find('T') != std::string::npos))); - cert->data.insert(std::make_pair("revoked", ConvToStr(v.find('R') != std::string::npos))); - cert->data.insert(std::make_pair("unknownsigner", ConvToStr(v.find('s') != std::string::npos))); + cert->invalid = (v.find('v') != std::string::npos); + cert->trusted = (v.find('T') != std::string::npos); + cert->revoked = (v.find('R') != std::string::npos); + cert->unknownsigner = (v.find('s') != std::string::npos); if (v.find('E') != std::string::npos) { - getline(s,v,'\n'); - cert->data.insert(std::make_pair("error", v)); + getline(s,cert->error,'\n'); } else { - getline(s,v,' '); - cert->data.insert(std::make_pair("fingerprint", v)); - - getline(s,v,' '); - cert->data.insert(std::make_pair("dn", v)); - - getline(s,v,'\n'); - cert->data.insert(std::make_pair("issuer", v)); + getline(s,cert->fingerprint,' '); + getline(s,cert->dn,' '); + getline(s,cert->issuer,'\n'); } } } |