X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_sslmodes.cpp;h=10002ca57b722884e20319071c3c3563e48bed33;hb=43e31bba5429849fdebeddc65f7e6f267211181f;hp=1ff93b7adaabd99c6fbbadf9593e8aa5c139b249;hpb=e57d1b19ff4823b7885eb7f4d3b37c84d2edca0e;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp index 1ff93b7ad..10002ca57 100644 --- a/src/modules/m_sslmodes.cpp +++ b/src/modules/m_sslmodes.cpp @@ -61,15 +61,20 @@ class SSLMode : public ModeHandler return MODEACTION_DENY; } + unsigned long nonssl = 0; const Channel::MemberMap& userlist = channel->GetUsers(); for (Channel::MemberMap::const_iterator i = userlist.begin(); i != userlist.end(); ++i) { ssl_cert* cert = API->GetCertificate(i->first); if (!cert && !i->first->server->IsULine()) - { - source->WriteNumeric(ERR_ALLMUSTSSL, channel->name, "all members of the channel must be connected via SSL"); - return MODEACTION_DENY; - } + nonssl++; + } + + if (nonssl) + { + source->WriteNumeric(ERR_ALLMUSTSSL, channel->name, InspIRCd::Format("All members of the channel must be connected via SSL (%lu/%lu are non-SSL)", + nonssl, static_cast(userlist.size()))); + return MODEACTION_DENY; } } channel->SetMode(this, true); @@ -159,13 +164,13 @@ class ModuleSSLModes { if (!api) { - user->WriteNumeric(ERR_SECUREONLYCHAN, cname, "Cannot join channel; unable to determine if you are an SSL user (+z)"); + user->WriteNumeric(ERR_SECUREONLYCHAN, cname, "Cannot join channel; unable to determine if you are an SSL user (+z is set)"); return MOD_RES_DENY; } if (!api->GetCertificate(user)) { - user->WriteNumeric(ERR_SECUREONLYCHAN, cname, "Cannot join channel; SSL users only (+z)"); + user->WriteNumeric(ERR_SECUREONLYCHAN, cname, "Cannot join channel; SSL users only (+z is set)"); return MOD_RES_DENY; } } @@ -190,7 +195,7 @@ class ModuleSSLModes if (!api || !api->GetCertificate(user)) { /* The sending user is not on an SSL connection */ - user->WriteNumeric(ERR_CANTSENDTOUSER, target->nick, "You are not permitted to send private messages to this user (+z set)"); + user->WriteNumeric(ERR_CANTSENDTOUSER, target->nick, "You are not permitted to send private messages to this user (+z is set)"); return MOD_RES_DENY; } }