X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_oper%2Fcmd_oper.cpp;h=2ca017525101bdb348de0691b6bd5f1d0af8e12f;hb=6cfabb0064cab52bbbab59974e53dc0fa1954da7;hp=c6b2955bf38ad4d9ae6bd9093b9e07b4abbdec78;hpb=aa692dc1039b63deef7886e914ec499abe7facaf;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_oper/cmd_oper.cpp b/src/coremods/core_oper/cmd_oper.cpp index c6b2955bf..2ca017525 100644 --- a/src/coremods/core_oper/cmd_oper.cpp +++ b/src/coremods/core_oper/cmd_oper.cpp @@ -1,6 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2020 Matt Schatz * Copyright (C) 2013-2014, 2017-2018 Sadie Powell * Copyright (C) 2012, 2014, 2016 Attila Molnar * Copyright (C) 2012 Robby @@ -53,7 +54,6 @@ CmdResult CommandOper::HandleLocal(LocalUser* user, const Params& parameters) if (match_pass && match_hosts) { - /* found this oper's opertype */ user->Oper(ifo); return CMD_SUCCESS; } @@ -65,9 +65,10 @@ CmdResult CommandOper::HandleLocal(LocalUser* user, const Params& parameters) if (!match_pass) fields.append("password "); if (!match_hosts) - fields.append("hosts"); + fields.append("hosts "); + fields.erase(fields.length() - 1, 1); - // tell them they suck, and lag them up to help prevent brute-force attacks + // Tell them they failed (generically) and lag them up to help prevent brute-force attacks user->WriteNumeric(ERR_NOOPERHOST, "Invalid oper credentials"); user->CommandFloodPenalty += 10000;