diff options
author | Peter Powell <petpow@saberuk.com> | 2019-07-26 20:19:32 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-07-26 20:19:32 +0100 |
commit | 93556dbfb8e8f6bfef5c74f1c0556836b818cb4a (patch) | |
tree | b967dac5df56f1433a3a674c18a9a9de662e3b6b /src/users.cpp | |
parent | 193eac649066bda33e693baadce6bc40181008f0 (diff) |
Improve the "max connections exceeded" oper snotice.
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/users.cpp b/src/users.cpp index 26353ab24..37e381485 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -487,14 +487,20 @@ void LocalUser::CheckClass(bool clone_count) { ServerInstance->Users->QuitUser(this, "No more connections allowed from your host via this connect class (local)"); if (a->maxconnwarn) - ServerInstance->SNO->WriteToSnoMask('a', "WARNING: maximum LOCAL connections (%ld) exceeded for IP %s", a->GetMaxLocal(), this->GetIPString().c_str()); + { + ServerInstance->SNO->WriteToSnoMask('a', "WARNING: maximum local connections for the %s class (%ld) exceeded by %s", + a->name.c_str(), a->GetMaxLocal(), this->GetIPString().c_str()); + } return; } else if ((a->GetMaxGlobal()) && (clonecounts.global > a->GetMaxGlobal())) { ServerInstance->Users->QuitUser(this, "No more connections allowed from your host via this connect class (global)"); if (a->maxconnwarn) - ServerInstance->SNO->WriteToSnoMask('a', "WARNING: maximum GLOBAL connections (%ld) exceeded for IP %s", a->GetMaxGlobal(), this->GetIPString().c_str()); + { + ServerInstance->SNO->WriteToSnoMask('a', "WARNING: maximum global connections for the %s class (%ld) exceeded by %s", + a->name.c_str(), a->GetMaxGlobal(), this->GetIPString().c_str()); + } return; } } |