diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-24 12:12:46 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-24 12:12:46 +0000 |
commit | e7b837ec5f120f928a0dc321fa918bdd01ab0c02 (patch) | |
tree | f3f38246a905b9301eee3a4e5e0ae5e6ae1e12e5 /src | |
parent | 813bc55a8496875cef52e6da42d608e4d2fa35da (diff) |
Kick the client in the balls if they try STARTTLS after client registration
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9801 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 2e954632e..91f29189e 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -75,8 +75,15 @@ class CommandStartTLS : public Command CmdResult Handle (const std::vector<std::string> ¶meters, User *user) { - user->io = Caller; - Caller->OnRawSocketAccept(user->GetFd(), user->GetIPString(), user->GetPort()); + if (user->registered == REG_ALL) + { + ServerInstance->Users->QuitUser(user, "STARTTLS not allowed after client registration"); + } + else + { + user->io = Caller; + Caller->OnRawSocketAccept(user->GetFd(), user->GetIPString(), user->GetPort()); + } return CMD_FAILURE; } |