]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sslinfo.cpp
m_spanningtree Update comments around collision handling
[user/henk/code/inspircd.git] / src / modules / m_sslinfo.cpp
index b24814fe3e7e621d643eeae2abdc49b4265cbd41..c354e4e0ecfcc4794f6b972574cabafc0e615d01 100644 (file)
@@ -91,7 +91,7 @@ class CommandSSLInfo : public Command
 
                if ((!target) || (target->registered != REG_ALL))
                {
-                       user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nickname", user->nick.c_str(), parameters[0].c_str());
+                       user->WriteNumeric(ERR_NOSUCHNICK, "%s :No such nickname", parameters[0].c_str());
                        return CMD_FAILURE;
                }
                bool operonlyfp = ServerInstance->Config->ConfValue("sslinfo")->getBool("operonly");
@@ -156,11 +156,11 @@ class ModuleSSLInfo : public Module
                ssl_cert* cert = cmd.CertExt.get(dest);
                if (cert)
                {
-                       ServerInstance->SendWhoisLine(source, dest, 671, "%s %s :is using a secure connection", source->nick.c_str(), dest->nick.c_str());
+                       ServerInstance->SendWhoisLine(source, dest, 671, "%s :is using a secure connection", dest->nick.c_str());
                        bool operonlyfp = ServerInstance->Config->ConfValue("sslinfo")->getBool("operonly");
                        if ((!operonlyfp || source == dest || source->IsOper()) && !cert->fingerprint.empty())
-                               ServerInstance->SendWhoisLine(source, dest, 276, "%s %s :has client certificate fingerprint %s",
-                                       source->nick.c_str(), dest->nick.c_str(), cert->fingerprint.c_str());
+                               ServerInstance->SendWhoisLine(source, dest, 276, "%s :has client certificate fingerprint %s",
+                                       dest->nick.c_str(), cert->fingerprint.c_str());
                }
        }
 
@@ -168,7 +168,7 @@ class ModuleSSLInfo : public Module
        {
                if ((command == "OPER") && (validated))
                {
-                       OperIndex::iterator i = ServerInstance->Config->oper_blocks.find(parameters[0]);
+                       ServerConfig::OperIndex::const_iterator i = ServerInstance->Config->oper_blocks.find(parameters[0]);
                        if (i != ServerInstance->Config->oper_blocks.end())
                        {
                                OperInfo* ifo = i->second;
@@ -176,7 +176,7 @@ class ModuleSSLInfo : public Module
 
                                if (ifo->oper_block->getBool("sslonly") && !cert)
                                {
-                                       user->WriteNumeric(491, "%s :This oper login requires an SSL connection.", user->nick.c_str());
+                                       user->WriteNumeric(491, ":This oper login requires an SSL connection.");
                                        user->CommandFloodPenalty += 10000;
                                        return MOD_RES_DENY;
                                }
@@ -184,7 +184,7 @@ class ModuleSSLInfo : public Module
                                std::string fingerprint;
                                if (ifo->oper_block->readString("fingerprint", fingerprint) && (!cert || cert->GetFingerprint() != fingerprint))
                                {
-                                       user->WriteNumeric(491, "%s :This oper login requires a matching SSL fingerprint.",user->nick.c_str());
+                                       user->WriteNumeric(491, ":This oper login requires a matching SSL certificate fingerprint.");
                                        user->CommandFloodPenalty += 10000;
                                        return MOD_RES_DENY;
                                }
@@ -208,7 +208,7 @@ class ModuleSSLInfo : public Module
                if (!cert || cert->fingerprint.empty())
                        return;
                // find an auto-oper block for this user
-               for(OperIndex::iterator i = ServerInstance->Config->oper_blocks.begin(); i != ServerInstance->Config->oper_blocks.end(); i++)
+               for (ServerConfig::OperIndex::const_iterator i = ServerInstance->Config->oper_blocks.begin(); i != ServerInstance->Config->oper_blocks.end(); ++i)
                {
                        OperInfo* ifo = i->second;
                        std::string fp = ifo->oper_block->getString("fingerprint");