diff options
| author | 2019-08-09 03:57:55 +0100 | |
|---|---|---|
| committer | 2019-08-09 04:07:33 +0100 | |
| commit | 7c7de81b6d513330984bb328de7599bb1328f989 (patch) | |
| tree | 1cd62b0d3419fcb93c488911f6ef8e5048f4bb99 /src/users.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
| parent | Fix waitpong referring to registration timeouts as ping timeouts. (diff) | |
| download | inspircd++-7c7de81b6d513330984bb328de7599bb1328f989.tar.gz inspircd++-7c7de81b6d513330984bb328de7599bb1328f989.tar.bz2 inspircd++-7c7de81b6d513330984bb328de7599bb1328f989.zip | |
Merge branch 'insp3' into master.
Diffstat (limited to 'src/users.cpp')
| -rw-r--r-- | src/users.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/users.cpp b/src/users.cpp index e1f62388c..0bcdc83a1 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -314,10 +314,10 @@ bool UserIOHandler::OnSetEndPoint(const irc::sockets::sockaddrs& server, const i return !user->quitting; } -void UserIOHandler::OnError(BufferedSocketError error) +void UserIOHandler::OnError(BufferedSocketError sockerr) { ModResult res; - FIRST_MOD_RESULT(OnConnectionFail, res, (user, error)); + FIRST_MOD_RESULT(OnConnectionFail, res, (user, sockerr)); if (res != MOD_RES_ALLOW) ServerInstance->Users.QuitUser(user, getError()); } @@ -441,6 +441,13 @@ void User::UnOper() */ oper = NULL; + // Remove the user from the oper list + stdalgo::vector::swaperase(ServerInstance->Users.all_opers, this); + + // If the user is quitting we shouldn't remove any modes as it results in + // mode messages being broadcast across the network. + if (quitting) + return; /* Remove all oper only modes from the user when the deoper - Bug #466*/ Modes::ChangeList changelist; @@ -454,9 +461,6 @@ void User::UnOper() ServerInstance->Modes.Process(this, NULL, this, changelist); - // Remove the user from the oper list - stdalgo::vector::swaperase(ServerInstance->Users.all_opers, this); - ModeHandler* opermh = ServerInstance->Modes.FindMode('o', MODETYPE_USER); if (opermh) this->SetMode(opermh, false); |
