]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_oper/cmd_oper.cpp
Hide User#host and User#dhost and use accessors to modify them.
[user/henk/code/inspircd.git] / src / coremods / core_oper / cmd_oper.cpp
index e4ba69549e6f7a6ffb6adce0da1a754c8c15bd3d..0322a059af0ea9da735c7d3a3d73ba093c75f466 100644 (file)
@@ -34,7 +34,7 @@ CmdResult CommandOper::HandleLocal(const std::vector<std::string>& parameters, L
        bool match_pass = false;
        bool match_hosts = false;
 
-       const std::string userHost = user->ident + "@" + user->host;
+       const std::string userHost = user->ident + "@" + user->GetRealHost();
        const std::string userIP = user->ident + "@" + user->GetIPString();
 
        ServerConfig::OperIndex::const_iterator i = ServerInstance->Config->oper_blocks.find(parameters[0]);
@@ -63,7 +63,7 @@ CmdResult CommandOper::HandleLocal(const std::vector<std::string>& parameters, L
                fields.append("hosts");
 
        // tell them they suck, and lag them up to help prevent brute-force attacks
-       user->WriteNumeric(ERR_NOOPERHOST, ":Invalid oper credentials");
+       user->WriteNumeric(ERR_NOOPERHOST, "Invalid oper credentials");
        user->CommandFloodPenalty += 10000;
 
        ServerInstance->SNO->WriteGlobalSno('o', "WARNING! Failed oper attempt by %s using login '%s': The following fields do not match: %s", user->GetFullRealHost().c_str(), parameters[0].c_str(), fields.c_str());