diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-10-21 15:10:44 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-10-21 15:10:44 +0200 |
commit | 569a742b9420b62a538c27fbd38a2bb8db6b9ca6 (patch) | |
tree | 662b4f7ce703540fee6e5896200622c2ee22b4a4 /src/commands/cmd_oper.cpp | |
parent | ab9de30e778a53dacf7175c6524a316da4f93640 (diff) |
Make better use of User::GetFullRealHost()
Diffstat (limited to 'src/commands/cmd_oper.cpp')
-rw-r--r-- | src/commands/cmd_oper.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/commands/cmd_oper.cpp b/src/commands/cmd_oper.cpp index e3f79d347..1a5e7e178 100644 --- a/src/commands/cmd_oper.cpp +++ b/src/commands/cmd_oper.cpp @@ -84,7 +84,6 @@ CmdResult CommandOper::HandleLocal(const std::vector<std::string>& parameters, L return CMD_SUCCESS; } } - char broadcast[MAXBUF]; std::string fields; if (!match_login) @@ -98,10 +97,8 @@ CmdResult CommandOper::HandleLocal(const std::vector<std::string>& parameters, L user->WriteNumeric(491, "%s :Invalid oper credentials",user->nick.c_str()); user->CommandFloodPenalty += 10000; - snprintf(broadcast, MAXBUF, "WARNING! Failed oper attempt by %s!%s@%s using login '%s': The following fields do not match: %s", user->nick.c_str(), user->ident.c_str(), user->host.c_str(), parameters[0].c_str(), fields.c_str()); - ServerInstance->SNO->WriteGlobalSno('o',std::string(broadcast)); - - ServerInstance->Logs->Log("OPER",DEFAULT,"OPER: Failed oper attempt by %s!%s@%s using login '%s': The following fields did not match: %s", user->nick.c_str(), user->ident.c_str(), user->host.c_str(), parameters[0].c_str(), fields.c_str()); + 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()); + ServerInstance->Logs->Log("OPER",DEFAULT,"OPER: Failed oper attempt by %s using login '%s': The following fields did not match: %s", user->GetFullRealHost().c_str(), parameters[0].c_str(), fields.c_str()); return CMD_FAILURE; } |