X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_sslmodes.cpp;h=6ac07434f7c0f9c2a7c615112ba35190042a4880;hb=7acb4ced207da7308d471a4ca434ce1cc7b9e9cb;hp=40398b3acc75879f3f8b9c8c348559c9a9b850f6;hpb=c286b42418c3d7614225b1226632a25ac513994b;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp index 40398b3ac..6ac07434f 100644 --- a/src/modules/m_sslmodes.cpp +++ b/src/modules/m_sslmodes.cpp @@ -24,8 +24,6 @@ #include "inspircd.h" #include "modules/ssl.h" -/* $ModDesc: Provides channel mode +z to allow for Secure/SSL only channels */ - /** Handle channel mode +z */ class SSLMode : public ModeHandler @@ -54,9 +52,9 @@ class SSLMode : public ModeHandler for(UserMembCIter i = userlist->begin(); i != userlist->end(); i++) { ssl_cert* cert = API->GetCertificate(i->first); - if (!cert && !ServerInstance->ULine(i->first->server)) + if (!cert && !i->first->server->IsULine()) { - source->WriteNumeric(ERR_ALLMUSTSSL, "%s %s :all members of the channel must be connected via SSL", source->nick.c_str(), channel->name.c_str()); + source->WriteNumeric(ERR_ALLMUSTSSL, "%s :all members of the channel must be connected via SSL", channel->name.c_str()); return MODEACTION_DENY; } } @@ -93,13 +91,6 @@ class ModuleSSLModes : public Module { } - void init() CXX11_OVERRIDE - { - ServerInstance->Modules->AddService(sslm); - Implementation eventlist[] = { I_OnUserPreJoin, I_OnCheckBan, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - } - ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) CXX11_OVERRIDE { if(chan && chan->IsModeSet(sslm)) @@ -116,7 +107,7 @@ class ModuleSSLModes : public Module else { // Deny - user->WriteServ( "489 %s %s :Cannot join channel; SSL users only (+z)", user->nick.c_str(), cname.c_str()); + user->WriteNumeric(489, "%s :Cannot join channel; SSL users only (+z)", cname.c_str()); return MOD_RES_DENY; } }