diff options
| author | 2021-04-18 19:29:34 +0100 | |
|---|---|---|
| committer | 2021-04-19 00:14:53 +0100 | |
| commit | e701bd030584ab7435e0c1baa188bed34db5df29 (patch) | |
| tree | 221b3d4fec4250429041a3509d3500309111d454 /src | |
| parent | Migrate collections from insert to emplace. (diff) | |
Rip out the OnConnectionFail event.
This never really worked correctly and will now be replaced with
something better.
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules.cpp | 1 | ||||
| -rw-r--r-- | src/usermanager.cpp | 10 | ||||
| -rw-r--r-- | src/users.cpp | 5 |
3 files changed, 1 insertions, 15 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index cc1a87605..642b2787e 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -151,7 +151,6 @@ void Module::OnSetUserIP(LocalUser*) { DetachEvent(I_OnSetUserIP); } void Module::OnServiceAdd(ServiceProvider&) { DetachEvent(I_OnServiceAdd); } void Module::OnServiceDel(ServiceProvider&) { DetachEvent(I_OnServiceDel); } ModResult Module::OnUserWrite(LocalUser*, ClientProtocol::Message&) { DetachEvent(I_OnUserWrite); return MOD_RES_PASSTHRU; } -ModResult Module::OnConnectionFail(LocalUser*, BufferedSocketError) { DetachEvent(I_OnConnectionFail); return MOD_RES_PASSTHRU; } void Module::OnShutdown(const std::string& reason) { DetachEvent(I_OnShutdown); } ServiceProvider::ServiceProvider(Module* Creator, const std::string& Name, ServiceType Type) diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 4f82c0f00..20ca10d0e 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -65,16 +65,6 @@ namespace // This user didn't answer the last ping, remove them. if (!user->lastping) { - ModResult res; - FIRST_MOD_RESULT(OnConnectionFail, res, (user, I_ERR_TIMEOUT)); - if (res == MOD_RES_ALLOW) - { - // A module is preventing this user from being timed out. - user->lastping = 1; - user->nextping = ServerInstance->Time() + user->GetClass()->GetPingTime(); - return; - } - time_t secs = ServerInstance->Time() - (user->nextping - user->GetClass()->GetPingTime()); const std::string message = "Ping timeout: " + ConvToStr(secs) + (secs != 1 ? " seconds" : " second"); ServerInstance->Users.QuitUser(user, message); diff --git a/src/users.cpp b/src/users.cpp index b373f9f93..d6d386045 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -342,10 +342,7 @@ bool UserIOHandler::OnSetRemoteEndPoint(const irc::sockets::sockaddrs& ep) void UserIOHandler::OnError(BufferedSocketError sockerr) { - ModResult res; - FIRST_MOD_RESULT(OnConnectionFail, res, (user, sockerr)); - if (res != MOD_RES_ALLOW) - ServerInstance->Users.QuitUser(user, GetError()); + ServerInstance->Users.QuitUser(user, GetError()); } Cullable::Result User::Cull() |
