summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_sslmodes.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp
index 67128e6bd..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<unsigned long>(userlist.size())));
+ return MODEACTION_DENY;
}
}
channel->SetMode(this, true);