X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_starttls.cpp;h=ea6536ed13585dcd2c601dcbb39b8f6af3cebb82;hb=99af213a58946185621b3e4de01970a7c21cce93;hp=d591eed5528264bb5966eaa46358dbc5b76b053d;hpb=f71e6bf9cb41811f18864f5d4eecb26e29d03f25;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_starttls.cpp b/src/modules/m_starttls.cpp index d591eed55..ea6536ed1 100644 --- a/src/modules/m_starttls.cpp +++ b/src/modules/m_starttls.cpp @@ -40,27 +40,27 @@ class CommandStartTLS : public SplitCommand works_before_reg = true; } - CmdResult HandleLocal(const std::vector& parameters, LocalUser* user) + CmdResult HandleLocal(LocalUser* user, const Params& parameters) CXX11_OVERRIDE { if (!ssl) { - user->WriteNumeric(ERR_STARTTLS, ":STARTTLS is not enabled"); + user->WriteNumeric(ERR_STARTTLS, "STARTTLS is not enabled"); return CMD_FAILURE; } if (user->registered == REG_ALL) { - user->WriteNumeric(ERR_STARTTLS, ":STARTTLS is not permitted after client registration is complete"); + user->WriteNumeric(ERR_STARTTLS, "STARTTLS is not permitted after client registration is complete"); return CMD_FAILURE; } if (user->eh.GetIOHook()) { - user->WriteNumeric(ERR_STARTTLS, ":STARTTLS failure"); + user->WriteNumeric(ERR_STARTTLS, "STARTTLS failure"); return CMD_FAILURE; } - user->WriteNumeric(RPL_STARTTLS, ":STARTTLS successful, go ahead with TLS handshake"); + user->WriteNumeric(RPL_STARTTLS, "STARTTLS successful, go ahead with TLS handshake"); /* We need to flush the write buffer prior to adding the IOHook, * otherwise we'll be sending this line inside the SSL session - which * won't start its handshake until the client gets this line. Currently, @@ -80,7 +80,7 @@ class CommandStartTLS : public SplitCommand class ModuleStartTLS : public Module { CommandStartTLS starttls; - GenericCap tls; + Cap::Capability tls; dynamic_reference_nocheck ssl; public: @@ -102,16 +102,6 @@ class ModuleStartTLS : public Module ssl.SetProvider("ssl/" + newprovider); } - void OnEvent(Event& ev) CXX11_OVERRIDE - { - tls.HandleEvent(ev); - } - - void On005Numeric(std::map& tokens) CXX11_OVERRIDE - { - tokens["STARTTLS"]; - } - Version GetVersion() CXX11_OVERRIDE { return Version("Provides support for the STARTTLS command", VF_VENDOR);