]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Allow modules to prevent a failed connection from being closed.
[user/henk/code/inspircd.git] / src / users.cpp
index a3807bd751fd8cac69dd3deed2824eeba31975a0..c0dc69ff4fc3b2dff5048ab9924d1579c83b5a18 100644 (file)
@@ -308,9 +308,12 @@ bool UserIOHandler::OnSetEndPoint(const irc::sockets::sockaddrs& server, const i
        return !user->quitting;
 }
 
-void UserIOHandler::OnError(BufferedSocketError)
+void UserIOHandler::OnError(BufferedSocketError error)
 {
-       ServerInstance->Users->QuitUser(user, getError());
+       ModResult res;
+       FIRST_MOD_RESULT(OnConnectionFail, res, (user, error));
+       if (res != MOD_RES_ALLOW)
+               ServerInstance->Users->QuitUser(user, getError());
 }
 
 CullResult User::cull()