diff options
| author | 2024-02-19 12:27:28 +0000 | |
|---|---|---|
| committer | 2024-02-19 12:27:28 +0000 | |
| commit | 57368bd9811b11de0a24e871253f3ab4ee008d1f (patch) | |
| tree | 9d7cfede879b18588eb45bca876a9948a4511473 /src/users.cpp | |
| parent | Split ExtBan::Acting from ExtBan::ActingBase. (diff) | |
If a user has an oper connect class then reset it when de-opering.
Diffstat (limited to 'src/users.cpp')
| -rw-r--r-- | src/users.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/users.cpp b/src/users.cpp index 667d9c651..8a67ddf13 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -642,7 +642,7 @@ void LocalUser::ChangeRemoteAddress(const irc::sockets::sockaddrs& sa) FOREACH_MOD(OnChangeRemoteAddress, (this)); } -bool LocalUser::FindConnectClass() +bool LocalUser::FindConnectClass(bool keepexisting) { ServerInstance->Logs.Debug("CONNECTCLASS", "Finding a connect class for {} ({}) ...", uuid, GetRealMask()); @@ -676,6 +676,9 @@ bool LocalUser::FindConnectClass() // The user didn't match any connect classes. if (connectclass) { + if (keepexisting) + return false; // They're fine keeping their existing one. + connectclass->use_count--; connectclass = nullptr; } |
