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<unsigned long>(userlist.size())));
+ return MODEACTION_DENY;
}
}
channel->SetMode(this, true);
{
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;
}
}
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;
}
}