diff options
author | Attila Molnar <attilamolnar@hush.com> | 2013-05-14 16:24:08 -0700 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2013-05-14 16:24:08 -0700 |
commit | 23e8bba13c55d33ce89d505780da36c9589e300a (patch) | |
tree | 85a2e81cde272a0900b0e448d2d1fabdfd7e897e /src/modules/extra | |
parent | c5ab97b1efe26609e7b9e3ff2301ad0c0911a0f6 (diff) | |
parent | 226a95aab09b9e1f43f61e78179bfa1135816c2d (diff) |
Merge pull request #523 from SaberUK/master+server-notice
Add method for writing server notices.
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 6 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 00dff68e6..b42853912 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -745,10 +745,10 @@ class ModuleSSLGnuTLS : public Module ssl_cert* cert = sessions[user->eh.GetFd()].cert; if (cert->fingerprint.empty()) - user->WriteServ("NOTICE %s :*** You are connected using SSL cipher \"%s\"", user->nick.c_str(), cipher.c_str()); + user->WriteNotice("*** You are connected using SSL cipher '" + cipher + "'"); else - user->WriteServ("NOTICE %s :*** You are connected using SSL cipher \"%s\"" - " and your SSL fingerprint is %s", user->nick.c_str(), cipher.c_str(), cert->fingerprint.c_str()); + user->WriteNotice("*** You are connected using SSL cipher '" + cipher + + "' and your SSL fingerprint is " + cert->fingerprint); } } } diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 5a0e56db2..6063b792c 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -287,10 +287,10 @@ class ModuleSSLOpenSSL : public Module if (sessions[user->eh.GetFd()].sess) { if (!sessions[user->eh.GetFd()].cert->fingerprint.empty()) - user->WriteServ("NOTICE %s :*** You are connected using SSL cipher \"%s\"" - " and your SSL fingerprint is %s", user->nick.c_str(), SSL_get_cipher(sessions[user->eh.GetFd()].sess), sessions[user->eh.GetFd()].cert->fingerprint.c_str()); + user->WriteNotice("*** You are connected using SSL cipher '" + std::string(SSL_get_cipher(sessions[user->eh.GetFd()].sess)) + + "' and your SSL fingerprint is " + sessions[user->eh.GetFd()].cert->fingerprint); else - user->WriteServ("NOTICE %s :*** You are connected using SSL cipher \"%s\"", user->nick.c_str(), SSL_get_cipher(sessions[user->eh.GetFd()].sess)); + user->WriteNotice("*** You are connected using SSL cipher '" + std::string(SSL_get_cipher(sessions[user->eh.GetFd()].sess)) + "'"); } } } |