X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fextra%2Fm_sslinfo.cpp;h=11912297d7c96f69908f0e252223751b9398abe5;hb=b950e46bfeef5643ff68c8c78530c1eff25d024e;hp=f8a06bc2ed33b1f76365b43284517883b3f2fd66;hpb=f8e07df6d6fe0250044929f3c200f2f2666d8f5c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/extra/m_sslinfo.cpp b/src/modules/extra/m_sslinfo.cpp index f8a06bc2e..11912297d 100644 --- a/src/modules/extra/m_sslinfo.cpp +++ b/src/modules/extra/m_sslinfo.cpp @@ -16,7 +16,6 @@ #include "channels.h" #include "modules.h" #include "transport.h" -#include "wildcard.h" #include "dns.h" /* $ModDesc: Provides /sslinfo command used to test who a mask matches */ @@ -33,7 +32,7 @@ class cmd_sslinfo : public Command this->syntax = ""; } - CmdResult Handle (const char* const* parameters, int pcnt, User *user) + CmdResult Handle (const std::vector ¶meters, User *user) { User* target = ServerInstance->FindNick(parameters[0]); ssl_cert* cert; @@ -44,21 +43,21 @@ class cmd_sslinfo : public Command { if (cert->GetError().length()) { - user->WriteServ("NOTICE %s :*** Error: %s", user->nick, cert->GetError().c_str()); + user->WriteServ("NOTICE %s :*** Error: %s", user->nick.c_str(), cert->GetError().c_str()); } - user->WriteServ("NOTICE %s :*** Distinguised Name: %s", user->nick, cert->GetDN().c_str()); - user->WriteServ("NOTICE %s :*** Issuer: %s", user->nick, cert->GetIssuer().c_str()); - user->WriteServ("NOTICE %s :*** Key Fingerprint: %s", user->nick, cert->GetFingerprint().c_str()); + user->WriteServ("NOTICE %s :*** Distinguised Name: %s", user->nick.c_str(), cert->GetDN().c_str()); + user->WriteServ("NOTICE %s :*** Issuer: %s", user->nick.c_str(), cert->GetIssuer().c_str()); + user->WriteServ("NOTICE %s :*** Key Fingerprint: %s", user->nick.c_str(), cert->GetFingerprint().c_str()); return CMD_SUCCESS; } else { - user->WriteServ("NOTICE %s :*** No SSL certificate information for this user.", user->nick); + user->WriteServ("NOTICE %s :*** No SSL certificate information for this user.", user->nick.c_str()); return CMD_FAILURE; } } else - user->WriteNumeric(401, "%s %s :No such nickname", user->nick, parameters[0]); + user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nickname", user->nick.c_str(), parameters[0].c_str()); return CMD_FAILURE; } @@ -71,7 +70,7 @@ class ModuleSSLInfo : public Module ModuleSSLInfo(InspIRCd* Me) : Module(Me) { - + newcommand = new cmd_sslinfo(ServerInstance); ServerInstance->AddCommand(newcommand); @@ -81,10 +80,10 @@ class ModuleSSLInfo : public Module virtual ~ModuleSSLInfo() { } - + virtual Version GetVersion() { - return Version(1, 2, 0, 0, VF_VENDOR, API_VERSION); + return Version("$Id$", VF_VENDOR, API_VERSION); } };