diff options
author | Peter Powell <petpow@saberuk.com> | 2019-07-31 21:25:44 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-07-31 21:46:07 +0100 |
commit | ef77989a9d067de7a51fcfae16df82f390ff5bb5 (patch) | |
tree | 5e9085e37a099dc066913c82bdc207dcbdf72410 /src | |
parent | 93556dbfb8e8f6bfef5c74f1c0556836b818cb4a (diff) |
Stop removing oper modes after a user have been quit network-wide.
Fixes #1686.
Diffstat (limited to 'src')
-rw-r--r-- | src/users.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/users.cpp b/src/users.cpp index 37e381485..cfdd1f0b5 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -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); |