]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Improve the "max connections exceeded" oper snotice.
authorPeter Powell <petpow@saberuk.com>
Fri, 26 Jul 2019 19:19:32 +0000 (20:19 +0100)
committerPeter Powell <petpow@saberuk.com>
Fri, 26 Jul 2019 19:19:32 +0000 (20:19 +0100)
src/users.cpp

index 26353ab24039f6a71626cfecf6b92b08e2d48e53..37e3814855b3555d71303bcd3d5463da48ea5c62 100644 (file)
@@ -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;
                }
        }