summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 702c09d31..f96afc606 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -71,7 +71,11 @@ class CommandStartTLS : public Command
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
{
- if (user->registered == REG_ALL)
+ /* changed from == REG_ALL to catch clients sending STARTTLS
+ * after NICK and USER but before OnUserConnect completes and
+ * give a proper error message (see bug #645) - dz
+ */
+ if (user->registered != REG_NONE)
{
ServerInstance->Users->QuitUser(user, "STARTTLS not allowed after client registration");
}