From 93556dbfb8e8f6bfef5c74f1c0556836b818cb4a Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Fri, 26 Jul 2019 20:19:32 +0100 Subject: [PATCH] Improve the "max connections exceeded" oper snotice. --- src/users.cpp | 10 ++++++++-- 1 file 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; } } -- 2.39.5