]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sslinfo.cpp
m_spanningtree Remove unneeded #includes
[user/henk/code/inspircd.git] / src / modules / m_sslinfo.cpp
index 161e7055cb4eab4f7506b27d7065a881df7a9cd9..b51c30b768ab0df72fdae9b89ebe275361de33f2 100644 (file)
@@ -18,7 +18,7 @@
 
 
 #include "inspircd.h"
-#include "ssl.h"
+#include "modules/ssl.h"
 
 /* $ModDesc: Provides SSL metadata, including /WHOIS information and /SSLINFO command */
 
@@ -91,13 +91,13 @@ class CommandSSLInfo : public Command
        {
                User* target = ServerInstance->FindNickOnly(parameters[0]);
 
-               if (!target)
+               if ((!target) || (target->registered != REG_ALL))
                {
                        user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nickname", user->nick.c_str(), parameters[0].c_str());
                        return CMD_FAILURE;
                }
                bool operonlyfp = ServerInstance->Config->ConfValue("sslinfo")->getBool("operonly");
-               if (operonlyfp && !IS_OPER(user) && target != user)
+               if (operonlyfp && !user->IsOper() && target != user)
                {
                        user->WriteServ("NOTICE %s :*** You cannot view SSL certificate information for other users", user->nick.c_str());
                        return CMD_FAILURE;
@@ -152,7 +152,7 @@ class ModuleSSLInfo : public Module
                {
                        ServerInstance->SendWhoisLine(source, dest, 671, "%s %s :is using a secure connection", source->nick.c_str(), dest->nick.c_str());
                        bool operonlyfp = ServerInstance->Config->ConfValue("sslinfo")->getBool("operonly");
-                       if ((!operonlyfp || source == dest || IS_OPER(source)) && !cert->fingerprint.empty())
+                       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());
                }
@@ -255,4 +255,3 @@ class ModuleSSLInfo : public Module
 };
 
 MODULE_INIT(ModuleSSLInfo)
-