]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Add a 10 second penalty on failed oper-up. This may seem a little extreme, but people...
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 21 Oct 2007 18:05:22 +0000 (18:05 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 21 Oct 2007 18:05:22 +0000 (18:05 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8265 e03df62e-2008-0410-955e-edbf42e46eb7

src/cmd_oper.cpp

index 1af42fffaa98e0536fcd8d63b241d4d8cbd33734..8fa5d938271a0fe63d66ec18a93717e490486dd0 100644 (file)
@@ -125,7 +125,10 @@ CmdResult cmd_oper::Handle (const char** parameters, int pcnt, User *user)
                                if (!match_hosts)
                                        fields.append("hosts");
                        }
+
+                       // tell them they suck, and lag them up to help prevent brute-force attacks
                        user->WriteServ("491 %s :Invalid oper credentials",user->nick);
+                       user->IncreasePenalty(10);
                        
                        snprintf(broadcast, MAXBUF, "WARNING! Failed oper attempt by %s!%s@%s using login '%s': The following fields do not match: %s",user->nick,user->ident,user->host, parameters[0], fields.c_str());
                        ServerInstance->SNO->WriteToSnoMask('o',std::string(broadcast));