diff options
author | aquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-22 16:47:10 +0000 |
---|---|---|
committer | aquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-22 16:47:10 +0000 |
commit | da074814501f23680b579feb1ad649c86e8a1348 (patch) | |
tree | 708a5e282425443c3351c0664ed0fa4c2a235eab /src/commands | |
parent | 07e1c65d9e6419df30a316a3b1f33434ab59f16f (diff) |
Convert remaining InspIRCd::Log() calls to new logging system
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9001 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/cmd_die.cpp | 4 | ||||
-rw-r--r-- | src/commands/cmd_kill.cpp | 2 | ||||
-rw-r--r-- | src/commands/cmd_oper.cpp | 6 | ||||
-rw-r--r-- | src/commands/cmd_restart.cpp | 2 | ||||
-rw-r--r-- | src/commands/cmd_whowas.cpp | 6 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/commands/cmd_die.cpp b/src/commands/cmd_die.cpp index 960cefe63..761127dcb 100644 --- a/src/commands/cmd_die.cpp +++ b/src/commands/cmd_die.cpp @@ -27,7 +27,7 @@ CmdResult CommandDie::Handle (const char* const* parameters, int pcnt, User *use if (!ServerInstance->PassCompare(user, ServerInstance->Config->diepass, parameters[0], ServerInstance->Config->powerhash)) { std::string diebuf = std::string("*** DIE command from ") + user->nick + "!" + user->ident + "@" + user->dhost + ". Terminating in " + ConvToStr(ServerInstance->Config->DieDelay) + " seconds."; - ServerInstance->Log(SPARSE, diebuf); + ServerInstance->Logs->Log("COMMAND",SPARSE, diebuf); ServerInstance->SendError(diebuf); if (ServerInstance->Config->DieDelay) @@ -37,7 +37,7 @@ CmdResult CommandDie::Handle (const char* const* parameters, int pcnt, User *use } else { - ServerInstance->Log(SPARSE, "Failed /DIE command from %s!%s@%s", user->nick, user->ident, user->host); + ServerInstance->Logs->Log("COMMAND",SPARSE, "Failed /DIE command from %s!%s@%s", user->nick, user->ident, user->host); ServerInstance->SNO->WriteToSnoMask('A', "Failed DIE Command from %s!%s@%s.",user->nick,user->ident,user->host); return CMD_FAILURE; } diff --git a/src/commands/cmd_kill.cpp b/src/commands/cmd_kill.cpp index c92b8a6b0..72aee4d1d 100644 --- a/src/commands/cmd_kill.cpp +++ b/src/commands/cmd_kill.cpp @@ -86,7 +86,7 @@ CmdResult CommandKill::Handle (const char* const* parameters, int pcnt, User *us * snotices, C will get a local kill snotice. this isn't accurate, and needs fixing at some stage. -- w00t */ ServerInstance->SNO->WriteToSnoMask('k',"Local Kill by %s: %s!%s@%s (%s)", user->nick, u->nick, u->ident, u->host, parameters[1]); - ServerInstance->Log(DEFAULT,"LOCAL KILL: %s :%s!%s!%s (%s)", u->nick, ServerInstance->Config->ServerName, user->dhost, user->nick, parameters[1]); + ServerInstance->Logs->Log("KILL",DEFAULT,"LOCAL KILL: %s :%s!%s!%s (%s)", u->nick, ServerInstance->Config->ServerName, user->dhost, user->nick, parameters[1]); /* Bug #419, make sure this message can only occur once even in the case of multiple KILL messages crossing the network, and change to show * hidekillsserver as source if possible */ diff --git a/src/commands/cmd_oper.cpp b/src/commands/cmd_oper.cpp index 608d04ba6..4acf88329 100644 --- a/src/commands/cmd_oper.cpp +++ b/src/commands/cmd_oper.cpp @@ -84,7 +84,7 @@ CmdResult CommandOper::Handle (const char* const* parameters, int, User *user) { user->WriteServ("491 %s :Invalid oper type (oper types must follow the same syntax as nicknames)",user->nick); ServerInstance->SNO->WriteToSnoMask('o',"CONFIGURATION ERROR! Oper type '%s' contains invalid characters",OperType); - ServerInstance->Log(DEFAULT,"OPER: Failed oper attempt by %s!%s@%s: credentials valid, but oper type erroneous.",user->nick,user->ident,user->host); + ServerInstance->Logs->Log("OPER",DEFAULT,"OPER: Failed oper attempt by %s!%s@%s: credentials valid, but oper type erroneous.",user->nick,user->ident,user->host); return CMD_FAILURE; } ServerInstance->Config->ConfValue(ServerInstance->Config->config_data, "type","host", j, HostName, MAXBUF); @@ -141,7 +141,7 @@ CmdResult CommandOper::Handle (const char* const* parameters, int, User *user) Event rmode2((char *)&n, NULL, "send_snoset"); rmode2.Send(ServerInstance); - ServerInstance->Log(DEFAULT,"OPER: Failed oper attempt by %s!%s@%s using login '%s': The following fields did not match: %s",user->nick,user->ident,user->host,parameters[0],fields.c_str()); + 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,user->ident,user->host,parameters[0],fields.c_str()); return CMD_FAILURE; } else @@ -155,7 +155,7 @@ CmdResult CommandOper::Handle (const char* const* parameters, int, User *user) Event rmode2((char *)&n, NULL, "send_snoset"); rmode2.Send(ServerInstance); - ServerInstance->Log(DEFAULT,"OPER: Failed oper attempt by %s!%s@%s using login '%s': credentials valid, but oper type nonexistent.",user->nick,user->ident,user->host,parameters[0]); + ServerInstance->Logs->Log("OPER",DEFAULT,"OPER: Failed oper attempt by %s!%s@%s using login '%s': credentials valid, but oper type nonexistent.",user->nick,user->ident,user->host,parameters[0]); return CMD_FAILURE; } } diff --git a/src/commands/cmd_restart.cpp b/src/commands/cmd_restart.cpp index 379052a1e..cc634d860 100644 --- a/src/commands/cmd_restart.cpp +++ b/src/commands/cmd_restart.cpp @@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) CmdResult CommandRestart::Handle (const char* const* parameters, int, User *user) { - ServerInstance->Log(DEFAULT,"Restart: %s",user->nick); + ServerInstance->Logs->Log("COMMAND",DEFAULT,"Restart: %s",user->nick); if (!ServerInstance->PassCompare(user, ServerInstance->Config->restartpass, parameters[0], ServerInstance->Config->powerhash)) { ServerInstance->SNO->WriteToSnoMask('A', "RESTART command from %s!%s@%s, restarting server.",user->nick,user->ident,user->host); diff --git a/src/commands/cmd_whowas.cpp b/src/commands/cmd_whowas.cpp index fd9544853..cece27670 100644 --- a/src/commands/cmd_whowas.cpp +++ b/src/commands/cmd_whowas.cpp @@ -207,7 +207,7 @@ void CommandWhowas::PruneWhoWas(time_t t) if (iter == whowas.end()) { /* this should never happen, if it does maps are corrupt */ - ServerInstance->Log(DEFAULT, "BUG: Whowas maps got corrupted! (1)"); + ServerInstance->Logs->Log("WHOWAS",DEFAULT, "BUG: Whowas maps got corrupted! (1)"); return; } @@ -240,7 +240,7 @@ void CommandWhowas::PruneWhoWas(time_t t) if (iter == whowas.end()) { /* this should never happen, if it does maps are corrupt */ - ServerInstance->Log(DEFAULT, "BUG: Whowas maps got corrupted! (2)"); + ServerInstance->Logs->Log("WHOWAS",DEFAULT, "BUG: Whowas maps got corrupted! (2)"); return; } whowas_set* n = (whowas_set*)iter->second; @@ -293,7 +293,7 @@ CommandWhowas::~CommandWhowas() if (iter == whowas.end()) { /* this should never happen, if it does maps are corrupt */ - ServerInstance->Log(DEFAULT, "BUG: Whowas maps got corrupted! (3)"); + ServerInstance->Logs->Log("WHOWAS",DEFAULT, "BUG: Whowas maps got corrupted! (3)"); return; } |