X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_sslinfo.cpp;h=b51c30b768ab0df72fdae9b89ebe275361de33f2;hb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;hp=161e7055cb4eab4f7506b27d7065a881df7a9cd9;hpb=349106f3f9f75d7f957fc5d1e71ca650f4807bb9;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_sslinfo.cpp b/src/modules/m_sslinfo.cpp index 161e7055c..b51c30b76 100644 --- a/src/modules/m_sslinfo.cpp +++ b/src/modules/m_sslinfo.cpp @@ -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) -